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

Control + arrow not a detectable option #120

Closed
artur-szpot opened this issue Aug 30, 2024 · 5 comments
Closed

Control + arrow not a detectable option #120

artur-szpot opened this issue Aug 30, 2024 · 5 comments

Comments

@artur-szpot
Copy link

Great project, thanks! Works like a charm. Small but useful addition would be to also be able to detect CTRL_UP, CTRL_LEFT, etc. events (perhaps also with other modifiers/for other functional keys?). Unless there is some limitation that prevents it?

@Cube707
Copy link
Collaborator

Cube707 commented Sep 1, 2024

a lot of this type of key-combinations are used for shortcuts in terminal emulator, so they are very inconsistent in what actually gets passed on to the program and whats gets captured earlier. So some keys might just not work even when listed in keys.

And on the Linux side it gets quite hard to pinpoint the exact character-sequences that make up these more rare key-combinations. Also #24 (though I have no Idea how to tackle that one ...)

But yes, Expanding the key-lists is pretty simple if all the char-sequences are known.

@artur-szpot
Copy link
Author

Thanks for the prompt reply. It is a technical limitation then, as expected. A pity, but this still remains the best lib I found for my use case, so I'll just have to assign a different key. Best of luck with further development :)

@Cube707
Copy link
Collaborator

Cube707 commented Sep 1, 2024

If your applications scope is limited enough that you are sure that the keys work as expected you can just add the constants in your application (CTRL_UP would be "\x00\x8d" on windows for example). You could even hot-patch the key module for your application.

Its just a different matter for the libary, because adding them will result in people complaining about the keys not working when really its just their terminal-emulator gobbeling them up...

@Cube707
Copy link
Collaborator

Cube707 commented Sep 1, 2024

For example, CTRL_UP works fine in windows CMD, but not in the VS-code terminal.

@artur-szpot
Copy link
Author

The app I'm writing is pretty much for personal use, but I like staying true to the sources I'm using, in case I do decide to share it at some point. It's not a major obstacle for me, anyway; I just felt it's an unexpected gap to have and wanted to confirm with you that it's not accidental. Thanks!

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

No branches or pull requests

2 participants