I have a macro that depends on triggering the Keyboard Shortcut Cmd + Y. I usually use a German Keyboard Layout and everything works fine. But once I switch to an Icelandic Keyboard Layout, my Keystroke Typing Action in KM changes automatically to Cmd + Z instead.
To demonstrate. Before (german keyboard layout):
And after (icelandic keyboard layout):
This all happens without me doing anything except changing the keyboard layout manually. Obviously this messes with my macro. So the question is: How can I prevent this and make sure my Macro always triggers Cmd + Y?
Hm, I saw those threads, but they still do not solve my problem. Also, it seems to me that @peternlewis 's statement
Hot Keys are based on key codes, and key codes pay no attention keyboard layout.
does not apply to my issue. Unless I am misunderstanding something. But if I have an Keystroke Typing Action set to Cmd + Y and then change my Keyboard Layout to another language, the Keystroke Action should certainly still trigger Cmd + Y, especially if the Action is based on Keycodes. Or not?
But doesn't that mean that if I prepare a macro that types ⌘Y on my German keyboard layout and then share it with the world that it would trigger incorrectly (acutally triggering ⌘Z) for anyone who has an English keyboard? I find this hard to believe.
Either way, is there a way to work around this? Is there some way/action to reliably detect currently selected keyboard layout?
I need to trigger the Quicklook Preview in Finder.
Space bar does not work in my particular case and I cannot trigger it via the menu entry, as the menu action's name always changes depending on which file is selected. Also I did not find any way to trigger this via Applescript.
Correct. Keycodes, as used in the Type a Keystroke action and the Hot Key trigger are independent of the keyboard layout - so if you change the keyboard layout, the keycode remains the same, and the keycap has likely changed.