pynput
pynput copied to clipboard
How to get Quartz.CGEventKeyboardGetUnicodeString to tell me which base character I typed last?
Description How to get Quartz.CGEventKeyboardGetUnicodeString to tell me which base character I typed last?
Platform and pynput version MacOS Catalina 10.15.7 pynput version unknown
To Reproduce I type a base character and then a combining character. I know only the last typed character (the combining character). I want to retrieve the base character I typed before, by means of Quartz.CGEventKeyboardGetUnicodeString or another electronic method. Is that possible and how exactly? I want this base character stripped of its combining character (in case it is still attached to it) and inserted (by means of chars or another variable) into the output string.