Skip to content

Commit

Permalink
ctlInputMethod // Ignore certain combinations with Alt+X.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen committed Jun 28, 2022
1 parent 38901c0 commit 4fb4ee0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SquirrelInputController.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ - (BOOL)handleEvent:(NSEvent*)event client:(id)sender
if (modifiers & OSX_COMMAND_MASK)
break;

// ignore certain combinations with Option+X / Alt+X hotkeys. [GitHub Issue #646]
const int arrAltSpecialSymbolsRAW[] = {0x32, 0xE, 0x20, 0x22, 0x2D};
if (modifiers & OSX_ALT_MASK) {
for (int i = 0; i < sizeof(arrAltSpecialSymbolsRAW); i++) {
if (arrAltSpecialSymbolsRAW[i] == event.keyCode) {
break;
}
}
}

int keyCode = event.keyCode;
NSString* keyChars = event.charactersIgnoringModifiers;
if (!isalpha(keyChars.UTF8String[0])) {
Expand Down

0 comments on commit 4fb4ee0

Please sign in to comment.