Browse files

With the numpad simulation on, make original keys "below" the numpad …

…simulation accessible with Fn
  • Loading branch information...
Sebastian Kienzl
Sebastian Kienzl committed Mar 16, 2017
1 parent ccaa382 commit a387e9f157129b474ce7adfbff22e2353c92b88b
Showing with 4 additions and 2 deletions.
  1. +4 −2 Boxer/DOS window/BXInputController+BXKeyboardInput.m
@@ -105,9 +105,11 @@ - (void) keyDown: (NSEvent *)theEvent
[self.representedObject resume: self];
//Check the separate key-mapping layer for numpad simulation for this key,
- //if the numpad simulation toggle is on or the user is holding down the Fn key.
+ //if the numpad simulation toggle is on XOR the user is holding down the Fn key.
+ //Why XOR? Then, with the simulation toggle on, the original keys "below" the
+ //numpad simulation can be accessed by holding the Fn key. (!= is logical XOR)
BOOL fnModified = (theEvent.modifierFlags & NSFunctionKeyMask) == NSFunctionKeyMask;
- BOOL simulateNumpad = self.simulatedNumpadActive || fnModified;
+ BOOL simulateNumpad = self.simulatedNumpadActive != fnModified;
CGKeyCode OSXKeyCode = theEvent.keyCode;
BXDOSKeyCode dosKeyCode = KBD_NONE;

0 comments on commit a387e9f

Please sign in to comment.