Can KM detect Left Shift + Key and Right Shift + Key ?
I would like:
Left Shift + period/greater than key to run macroA.
Right Shift + period/greater than key to run macroB.
Is this possible?
Can KM detect Left Shift + Key and Right Shift + Key ?
I would like:
Left Shift + period/greater than key to run macroA.
Right Shift + period/greater than key to run macroB.
Is this possible?
Keyboard Maestro cannot distinguish between left shift and right shift. This is because KM only uses Apple APIs that are public (i.e. intended by Apple to be available to external developers) and MacOS does not offer an official way to tell those shift keys apart.
I believe that BetterTouchTool can currently still be used to distinguish between left shift and right shift (via a method that will not have been approved by Apple, and which might therefore break under a MacOS upgrade one day) so you could try coming up with a solution that uses BTT to tell KM which key is being held down. I wouldn’t bother, though. ![]()
Actually, KM can do that
There's an example macro in this forum. I just can’t find it right now.
Ah, here
Oh, right, so those macros use the USB device key trigger. The possibility occurred to me but I couldn’t find anything in the forum or wiki and I wouldn’t have known how to implement such a solution!
The macro works, then, because the USB device key trigger does not interfere with the usual functioning of the shift key.
Unlike hot key triggers, the pressed key is not removed or affected in any way. This trigger watches input devices at a low level, but it does not affect them, so any key presses continue to have their normal operation as well as triggering the macro.
– trigger:USB Device Key [Keyboard Maestro Wiki]
My understanding is still that the reason Keyboard Maestro does not offer built-in support for distinguishing between the two shift keys is for the API reason I gave above. The USB device key method used by the macros adds this functionality but the trigger value would vary according to the type of keyboard, if one is not using a built-in keyboard, so the challenge requires setting up by the user if the default value does not work.
I think your interpretation is correct. And it’s true that using KM for this can be a bit of a hassle. Anyone who needs this feature on a large scale is better advised to use BTT, just as you said ![]()