DEV Community

Discussion on: Creating a global configurable shortcut for MacOS apps in Swift

Collapse
 
kurtbliss profile image
KurtBliss

I'm a bit new to Xcode and swift and I got the hotels working for bringing the window up... But it's doesn't seem to works for the caps lock button.. It'll decide the caps lock button when setting it, but then it just ignores the caps locks key, if you have Command + CapsLock + D for example Command + D will bring up the window still. CapsLock + D set, then try to bring up the window and no luck for me.... Wonder what it is.

Collapse
 
mitchartemis profile image
Mitch Stanley

There are certain keys that can't be used for shortcuts. Capslock is a funny one as it's more of a toggle key rather than an input, so it might not be usable.

It might be best to add in some validation to tell users when certain keys aren't available or certain combinations can't be used (e.g. command+c for example, which is already a system-wide command).