Skip to content

Commit

Permalink
fix(mac): break up timerAction function
Browse files Browse the repository at this point in the history
  • Loading branch information
sgschantz committed Dec 13, 2024
1 parent f0cd0c6 commit 03b925a
Showing 1 changed file with 0 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,42 +123,6 @@ - (void)stopTimer {
*/
- (void)timerAction:(NSTimer *)timer {
UInt32 modifiers = GetCurrentKeyModifiers();
if ((modifiers & shiftKey) == shiftKey) {
[self.oskView setPhysicalShiftState:YES];
self.previousShiftState = YES;
}
else {
[self.oskView setPhysicalShiftState:NO];
if (self.previousShiftState)
[self.oskView setOskShiftState:NO];
self.previousShiftState = NO;
}
if ((modifiers & optionKey) == optionKey) {
[self.oskView setPhysicalOptionState:YES];
self.previousOptionState = YES;
}
else {
[self.oskView setPhysicalOptionState:NO];
if (self.previousOptionState)
[self.oskView setOskOptionState:NO];
self.previousOptionState = NO;
}

if ((modifiers & controlKey) == controlKey) {
[self.oskView setPhysicalControlState:YES];
self.previousControlState = YES;
}
else {
[self.oskView setPhysicalControlState:NO];
if (self.previousControlState)
[self.oskView setOskControlState:NO];
self.previousControlState = NO;
}
}

/*
- (void)trackPhysicalModifierKeyState:(NSTimer *)timer {
UInt32 modifiers = GetCurrentKeyModifiers();

[self trackPhysicalShiftKeyState: modifiers];
[self trackPhysicalOptionKeyState: modifiers];
Expand Down Expand Up @@ -206,7 +170,6 @@ - (void)trackPhysicalControlKeyState:(UInt32) modifiers {
self.previousControlState = NO;
}
}
*/

- (BOOL)hasHelpDocumentation {
NSString *kvkPath = [self AppDelegate].kvk.filePath;
Expand Down

0 comments on commit 03b925a

Please sign in to comment.