diff options
| author | Teddy Wing | 2021-03-07 02:24:32 +0100 |
|---|---|---|
| committer | Teddy Wing | 2021-03-07 02:25:31 +0100 |
| commit | 97655be01b1740d65e130015d40a92aa9a993e79 (patch) | |
| tree | daabc0aa86aa49777d18a44e4ef12dd82a0b0661 /main.m | |
| parent | b0523091cf13842f3fea9e21b34d8d611615e2a2 (diff) | |
| download | Re-Good-Catalina-Invert-Colours-97655be01b1740d65e130015d40a92aa9a993e79.tar.bz2 | |
main: Register F8 hotkey to toggle colour inversion
Allow toggling with both <C-M-D-8> and <F8>.
Diffstat (limited to 'main.m')
| -rw-r--r-- | main.m | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -22,6 +22,16 @@ int main(int argc, const char * argv[]) { NSLog(@"Error registering hotkey"); } + if ( + ![c registerHotKeyWithKeyCode:kVK_F8 + modifierFlags:0 + target:invert + action:@selector(toggleInvertColors:) + object:nil] + ) { + NSLog(@"Error registering hotkey"); + } + [NSApp run]; return 0; |
