[ad_1]
The example given in the pynput documentation is:
def darwin_intercept(event_type, event):
import Quartz
length, chars = Quartz.CGEventKeyboardGetUnicodeString(
event, 100, None, None)
if length > 0 and chars == 'x':
# Suppress x
return None
else:
return event
But how to suppress function keys, e.g., the control key (who doesn’t have an Unicode equivalent)?
I tried simply replacing chars == 'x'
by virtualKey == 0x37
, but got an error message…
[ad_2]