GreptimeTeam/demo-scene

[Bug] Monitor keyboard key combination exceptions on Windows systems

Closed this issue · 4 comments

On Windows systems, monitor keyboard key combination exceptions. When using a key combination, ctrl + any letter key, the letter key is not displayed properly. It is normal to use keys like alt, or shift in combination with letters.

image

This seems to be an issue for https://github.com/moses-palmer/pynput/issues.

You can report there to improve the representation.

Instead, we'd probably add a transformer to improve the display string.

BTW when the modifier key changes the following key's semantic, it will display the effective key.

Said if you press Shift and 3, you'd get: Key.shift+'#' instead of Key.shift+'3'.

Closing ...

Not quite an issue of this repo. Perhaps pynput not the best but I don't find other library better. If you find a better replacement, I'm glad to give it a try to replace the current source.

I ever tried https://github.com/LaunchMenu/node-global-key-listener but it doesn't work on MacOS for its latest version. And it's hard to integrate with the Python ecosystem where we can visualize with Streamlit. Anyway it's possible to communicate between processes but then the demo become over-complicated.

Reported to pynput in moses-palmer/pynput#591.