Browse files

Merge pull request #66 from sebknzl/master

With the numpad simulation on, make original keys "below" the numpad simulation accessible with Fn
  • Loading branch information...
alunbestor committed Mar 18, 2017
2 parents ccaa382 + a387e9f commit 0062fc18e154cde6cef3bf3329be4b0658597e31
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 0062fc1

Please sign in to comment.