Skip to content

Commit 5a8705a

Browse files
committed
Remove hydra-shield binary
1 parent c41d5ae commit 5a8705a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ _NCrunch*
137137

138138
# macOS shield helper — compiled from Resources/MacShield/main.swift
139139
Hydra/Resources/MacShield/hydra-shield
140+
Hydra/Resources/MacShield/hydra-shield.app/
140141

141142
# private project instructions
142143
CLAUDE.md

Hydra/Platform/MacOs/MacKeyResolver.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ internal sealed class MacKeyResolver
1212
private KeyModifiers _previousModifiers;
1313
private readonly Dictionary<int, CharClassification> _keyDownId = [];
1414

15+
private static readonly nint _carbon =
16+
NativeLibrary.Load("/System/Library/Frameworks/Carbon.framework/Carbon");
17+
1518
// symbol pointer for kTISPropertyUnicodeKeyLayoutData (loaded once)
16-
private static readonly nint TisPropertyUnicodeKeyLayoutData = LoadTisPropertyKey();
19+
private static readonly nint TisPropertyUnicodeKeyLayoutData =
20+
Marshal.ReadIntPtr(NativeLibrary.GetExport(_carbon, "kTISPropertyUnicodeKeyLayoutData"));
1721

1822
internal KeyEvent? Resolve(int eventType, nint eventRef)
1923
{
@@ -159,9 +163,4 @@ internal static KeyModifiers MapModifiers(ulong cgFlags)
159163
internal static bool DetectAltGr(char? character, bool isCommand, bool optionHeld) =>
160164
optionHeld && !isCommand && character.HasValue;
161165

162-
private static readonly nint _carbon =
163-
NativeLibrary.Load("/System/Library/Frameworks/Carbon.framework/Carbon");
164-
165-
private static nint LoadTisPropertyKey() =>
166-
Marshal.ReadIntPtr(NativeLibrary.GetExport(_carbon, "kTISPropertyUnicodeKeyLayoutData"));
167166
}

0 commit comments

Comments
 (0)