I got to thinking as I was reading this… The keyboard preference panel allows you to change the modifier keys, (look in the keyboard panel and see the button labeled “Modifier Keys…”).
So I wondered if you disable it as a Caps lock key if it can be used as modifier key but it doesn’t work. Why is that @peternlewis?
Keyboard Maestro operates at a relatively high level. If you disable the Cay Caps key, then it is not visible to Keyboard Maestro (it is possible you could use a Device Key trigger to detect it).
These are the kinds of things that continue to amaze me. What I would call little hidden gems, although they’re right out in the open - it’s just hard sometimes to think about using them.
I guess this is what happens when you have a mature product, and a developer who is brilliant, listens to his users, and dogfoods his own product (I think that last phrase is redundant, but you know what I mean).
[bows towards Australia, quoting Wayne’s World: “We’re not worthy!”].
This has been an action packed day of discovery for me. All day I should have been working on something else yet I persevered pursuing the Holy Grail of automation.
If you think of each rabbit trail as an entry pushed onto a stock to hopefully later be popped off so the previous entry can be worked on, I think my stack’s count is in the 20s right now. But I’m retired, so what they hay, huh?
Awesome, thanks @peternlewis and glad this is useful to others! Peter, the reason I’m messing with using KM for this is I’m experimenting with a macOS Sierra build, and Karabiner is currently broken (the developers say that it’s actually a pretty major break and might take a long time to fix), so I’m hoping KM can be a stopgap.
I’ll try adding the timer to see if that helps. Thanks again!
@tedsvo Did you get this to work? I'm in the same situation, missing my Hyper key on Sierra and would love to simulate it with Keyboard Maestro if possible.
I've got the device key recognizing when the disabled Caps Lock key is triggered but I'm not sure how to get the behavior to work as @peternlewis suggested.
Here's what I have now:
I've tried changing the device key trigger to is pressed and is down as well as setting the Pause to is enabled and is active.
I'm wondering if I've setup the un-pause macro correctly as it remains true no matter what.
"Is enabled" basically means the macro is enabled, which is always the case seen at the checkbox top right. You can enable and disable macros. However i tested the same with a Variable i set to 1 when Caps is pressed and 0 when its released. Looking at the keyboard view, the modifiers get pressed, but whenever i press another key they are released.
This means it is not possible this way and idk why keyboard maestro is releasing them as it says that the modifiers should be pressed while the macro runs.
Thanks for the info, I hadn’t thought about using variables the way you did, that’s great! Now if only we could get it to hang on to the modifier keys.
It seems like that there is a bug in press and hold modifier action. When I set the modifiers in a macro
and let this run constantly I can press any key and the modifiers are released, even tho I don't stop
the macro. Is that something wanted or a bug?
Like in the help stays "Note: keys that are pressed stay pressed only as long as the macro continues to run.".
When I now use it in Chrome etc. it doesn't get recognised somehow. What am I doing wrong
Sure, because Type the F Keystroke means “Type the F Keystroke without any modifiers”, just like “Type the Shift-F Keystroke” means “Type the Shift-F Keystroke without any modifiers except Shift”.
Hm, how would that work? I sadly only know the KM commands I’ve used, and discover amazing new features all the time.
What I think my scripts does is, sets a variable to 1 or 0 depending on whether the caps lock is sensed. I understand if it gets turned on before KM loads or there is confusion it can become flipped, eg my variable being set to 1 when it’s turned off, not on. My main goal is to have scripts halt if this variable becomes 1.