aboutsummaryrefslogtreecommitdiffstats
path: root/main.m
diff options
context:
space:
mode:
authorTeddy Wing2021-03-07 02:24:32 +0100
committerTeddy Wing2021-03-07 02:25:31 +0100
commit97655be01b1740d65e130015d40a92aa9a993e79 (patch)
treedaabc0aa86aa49777d18a44e4ef12dd82a0b0661 /main.m
parentb0523091cf13842f3fea9e21b34d8d611615e2a2 (diff)
downloadRe-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.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.m b/main.m
index 6390483..7b54de8 100644
--- a/main.m
+++ b/main.m
@@ -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;