You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation on hs.eventtap.event.rawFlagMasks has incorrect documentation. It says the basic modifiers (alternate, command, control, shift) correspond to the left key, and it lists alternates beginning with deviceLeft that are part of a section saying these haven't been observed.
I just set up a quick tap and what I'm seeing on macOS 10.15.5 (19F96) is that the basic modifiers are present for both left and right modifiers, but left modifiers also include the deviceLeft version and right modifiers also include the deviceRight version. By that I mean if I press left shift, the flags I see present are deviceLeftShift, shift, nonCoalesced. If I press right shift I get shift, nonCoalesced, deviceRightShift. If I press both at the same time I get deviceLeftShift, shift, nonCoalesced, deviceRightShift. This holds true for the other modifiers as well.
There also exists a constant NSEventModifierFlagDeviceIndependentFlagsMask with the value 0xffff0000UL that can be used to filter out the deviceLeft* and deviceRight* flags. We should probably add that to the table too.
The text was updated successfully, but these errors were encountered:
The documentation on
hs.eventtap.event.rawFlagMasks
has incorrect documentation. It says the basic modifiers (alternate
,command
,control
,shift
) correspond to the left key, and it lists alternates beginning withdeviceLeft
that are part of a section saying these haven't been observed.I just set up a quick tap and what I'm seeing on macOS 10.15.5 (19F96) is that the basic modifiers are present for both left and right modifiers, but left modifiers also include the
deviceLeft
version and right modifiers also include thedeviceRight
version. By that I mean if I press left shift, the flags I see present aredeviceLeftShift, shift, nonCoalesced
. If I press right shift I getshift, nonCoalesced, deviceRightShift
. If I press both at the same time I getdeviceLeftShift, shift, nonCoalesced, deviceRightShift
. This holds true for the other modifiers as well.There also exists a constant
NSEventModifierFlagDeviceIndependentFlagsMask
with the value0xffff0000UL
that can be used to filter out thedeviceLeft*
anddeviceRight*
flags. We should probably add that to the table too.The text was updated successfully, but these errors were encountered: