cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

Hotkeys change when keyboard layout changes #31

Closed sdsykes closed 10 years ago

sdsykes commented 10 years ago

Here is the issue, well explained: http://discuss.binaryage.com/t/changing-keyboard-layouts-changes-hotkey-value/1500

I figure this is impossible to fix at the moment as actual keycodes are stored. If some kind of string was stored (eg as returned by keyCodeString) then perhaps that could be converted back to a keycode when needed?

shpakovski commented 10 years ago

Hello Stephen, you are correct: MASShortcut stores the key code and ignores the layout. Then OS X must be preferring the local hotkey to the global hook. Storing the keyCodeString would work, that's right. But this approach brings the problem with multiple languages: the hotkey stored in English will not work in Russian etc. So please consider another shortcut for that particular case. I am sorry for inconvenience.