-
-
Notifications
You must be signed in to change notification settings - Fork 833
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
feat: Identify modifiers in Wayland/X11 #4629
Conversation
49f2879
to
a758a9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a high level, I think it is reasonable to do this kind of probe to reason about the keymap. We do something similar to detect dead keys in the Windows implementation.
I can't follow the code well enough to really understand it, and I don't understand why Wayland needs to be treated differently from X11 when the data model for both is the same keyboard map and state.
Most of my comments are suggestions for making it easier to follow and may not be the most constructive wrt. the higher level goal.
@wez: Thanks! for helping out on this: input really appreciated, also my compile switch is still wrong in the code (the code needs to switch in the ctor of the keyboard to select the appropriate impl for the modifier detection) I moved the code to modifiers.ra for the reason that its not that easy to understand, and that we can simply drop it or exchange it, or use the initi_modifiers_fallback which is the current thing wezterm does. |
@wez: the PR is far from finished, once X11 is implemented it needs documentation for the user what to consider about modifiers on wayland etc |
@wez: The implementation for X11 is finished, last commit.. I think this code is better to understand and also gives some reason why it does not work on Wayland, xlib calls I think. I added I have not answered the Windows and MacOs question about the Led stuff i removed. I still have to investigate this. Implementation wise I think everything is now there similar to what kitty does, which is probably a good thing. Thanks for the review. I think I still need to add some documentation to highlight what is done on startup for X11 and Wayland such that users understand. Do you have a suggestion where I could add this? |
Co-authored-by: Wez Furlong <[email protected]>
Co-authored-by: Wez Furlong <[email protected]>
Co-authored-by: Wez Furlong <[email protected]>
8c5a6d2
to
fcd45b7
Compare
@wez Could you please reopen the PR. Github had some troubles not updating the commits ?? I tried to close and reopen it. BR. |
Fixes: #4626
The solution is encapsulated out in file
modifiers.rs
for both X11 and Wayland.xkb
and its state...This PR contains the port of Kittys C code for Wayland.