Left vs right modifier keys, eg. L-shift vs r-shift

Is there a way MTPro can recognize the difference between left and right modifier keys, such as L_Shift and R_Shift, on Mac OS?

Currently, under Incoming / Shortcut, there are no such options that I have been able to find. I’ve checked automatic recognition, the checkboxes, and the ‘Special Key …’ dropdown menu.

Thanks!

I don’t there there is a differentiator between left and right shift on a Mac.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Ah, okay, I looked into it and I guess this is a pie-in-the-sky feature request, Here are the details (from the AI):

1. What macOS receives

  • At the HID level (what QMK sends), the left and right versions of Control, Shift, Option (Alt), and Command are different usages.
  • macOS’s event system does preserve that distinction in the low-level APIs:
    • CoreGraphics CGEventFlags has separate bits for LeftCommand/RightCommand, LeftShift/RightShift, etc.
    • IOHID and HIDEventSystem APIs can also tell left vs right explicitly.
  • So if you write a driver, or use a low-level listener like Karabiner-Elements, you can detect left vs right modifiers independently.

2. What typical macOS apps see

  • NSEvent.ModifierFlags (the high-level AppKit API) collapses left+right into a single flag per modifier. For example: pressing either Shift key just sets .shift. There’s no way in AppKit alone to ask “was it left or right shift?”.

In general, we would like to support a distinction of left vs. right SHIFT (and the other modifiers).

However, first of all, there is the problem that there are only 2 SHIFT keys, but we would like to support 3 different SHIFT variants:

  1. SHIFT: triggers on both left and right
  2. LEFT SHIFT: left shift only
  3. RIGHT SHIFT: right shift only

We don’t know how you could type keys to allow all 3 variants. Using the drop-down would not allow you to use that SHIFT variant as modifier (i.e. for keystroke combinations).

Current state is that on Windows, using the right SHIFT key will result in a right-only RIGHT SHIFT, but there is not way to enter LEFT SHIFT. On Mac, as you’ve noticed, we have not implemented a distinction of left vs. right at all.

What would be your use case?