Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linux special keycodes interpreted as input strings #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vlrevolution
Copy link

I noticed an issue where our Linux input handling was treating special keycodes (like arrow keys, function keys, etc.) as regular input strings. This was causing some weird behavior when users tried to use these keys.

To fix this, I made a couple of changes:

In cdp_patches/input/init.py, I updated the LinuxKeyboardCodes class to wrap all special keycodes in double angle brackets (<<>>). This helps distinguish them from regular text input.

In cdp_patches/input/os_base/linux.py, I modified the send_keystrokes method to recognize these new wrapped keycodes. It now strips off the <<>> before processing the keycode.

These changes should make our input handling more consistent across different operating systems and prevent special keys from being typed out as literal strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant