Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
Disable symbolic hot keys when recording shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
eczarny committed Dec 18, 2016
1 parent fa0dbf9 commit bf4cacb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Spectacle/Sources/SpectacleShortcutRecorder.m
Expand Up @@ -23,6 +23,7 @@ @implementation SpectacleShortcutRecorder
BOOL _isMouseDown;
BOOL _isMouseAboveBadge;
NSTrackingArea *_badgeButtonTrackingArea;
void *_shortcutMode;
}

- (instancetype)initWithFrame:(NSRect)frame
Expand Down Expand Up @@ -151,6 +152,7 @@ - (void)drawRect:(NSRect)rect
- (void)_startRecording
{
_isRecording = YES;
_shortcutMode = PushSymbolicHotKeyMode(kHIHotKeyModeAllDisabled);
[self _updateTrackingArea];
[self setNeedsDisplay:YES];
}
Expand All @@ -160,6 +162,7 @@ - (void)_stopRecording
if (!_isRecording) {
return;
}
PopSymbolicHotKeyMode(_shortcutMode);
_isRecording = NO;
_isMouseAboveBadge = NO;
[self _updateTrackingArea];
Expand Down

0 comments on commit bf4cacb

Please sign in to comment.