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

Send sequence events to child if they don't match kitty. #5841

Merged
merged 5 commits into from
Dec 31, 2022

Conversation

ppwwyyxx
Copy link
Contributor

@ppwwyyxx ppwwyyxx commented Dec 30, 2022

Fix #5840

Applications that use key sequences:

@kovidgoyal
Copy link
Owner

If you expect to have this merged, it needs to work robustly, which means dealing with release events as well. The kitty keyboard protocol is getting more and more widespread adoption which means more and more terminal programs will become capable of responding to release events.

@ppwwyyxx
Copy link
Contributor Author

The latest commit deals with release events: when ctrl+b>l is a kitty key binding and ctrl+b>c is pressed, the show_key kitten can receive press and release events of ctrl+b and c.

@kovidgoyal
Copy link
Owner

You have to record and play back modifier key events as well, currently
they are excluded in keys.c Also you cant use the w pointer after
calling process_sequence, since that could have invalidated it. Instead
use

w = window_for_window_id(active_window_id)

@ppwwyyxx
Copy link
Contributor Author

ppwwyyxx commented Dec 31, 2022

Sure, now modifier sequence is also replayed (using the same test case):
2022-12-30_22-56

And the window pointer is reset.

@ppwwyyxx
Copy link
Contributor Author

Maybe it would be a good idea to avoid duplication by moving is_modifier_key to glfw.c and exposing it to Python? Let me know if you would like that.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 31, 2022 via email

@ppwwyyxx
Copy link
Contributor Author

OK, done. Not sure if I'm doing it in a good way though.

@kovidgoyal kovidgoyal merged commit bd33cef into kovidgoyal:master Dec 31, 2022
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.

Key sequence is not sent to children if a prefix is mapped by kitty
2 participants