How to control modifier keys from Logitech MX
Asked by @Jonathan_Grossman in another thread, moved here.
- Christian Scheuer @chrscheuer2020-04-21 11:05:36.131Z
Original post:
- JJonathan Grossman @Jonathan_Grossman
cool thanks.
Also, searched the forum but didn't find if you can just make a MACRO of a modifier key. I know this seems weird, but it more of an ergonomic thing. I keep my hands on the Shuttle so it's convenient to have SHIFT and COMMAND as one of the keys on the SHUTTLE. Don't see how to do that
Christian Scheuer @chrscheuer2020-04-21 00:56:04.464Z
Hi Jonathan.
You can check out the
sf.keyboard.modifiers
action, but I don't think it will give you the experience you're after.
There's a ton of SF actions, scripts etc. that make use of the keyboard from time to time, and each call to such a script will reset the modifiers. So if you're looking for an action that could replace the physical modifier key and work just as ubiquitously, SF doesn't have that today.- JJonathan Grossman @Jonathan_Grossman
Ok - thanks for clarifying. Is it difficult to program? I am moving over from Keyboard Maestro (mainly bc of your amazing customer support) and they have this feature.
I'd be happy to pay a custom fee to add that feature sooner than later. LMK. Thanks.
Christian Scheuer @chrscheuer2020-04-21 11:30:02.314Z
Hi Jonathan. Since this is turning out to be a longer discussion, I've moved this to its own separate thread so we can get some code samples going.
It's either going to be easy to program, or it doesn't work all the time, and then it's gonna be really hard.
But it's worth it to check out.
So we need a script that can simulate pressing down a modifier, like this:
sf.keyboard.modifiers({ isShift: true });
And then another script that simulates releasing all modifiers:
sf.keyboard.modifiers({});
BUT. This only works if your script could get called when you release the mouse's button, and right now we filter out Key-Up events.
So I don't think we can get this working right now for you.