-
Notifications
You must be signed in to change notification settings - Fork 957
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
Improve unknown keysym handling by reusing keycodes #1734
Conversation
6c69583
to
49bc636
Compare
I have added separate implementations for x0vnceserver & xvnc. Trying to share this piece of code creates too many problems because both servers are using different headers, different way of getting/updating keymaps, and different build systems. |
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.
Sorry for the huge delay reviewing this.
I think this looks reasonable, but I haven't done any actual testing yet.
Clever using the naming to track our modified keys. :)
Have you checked that the naming resets when you modiify the keyboard layout using other tools?
Instead of giving up after all free keycodes have been used, Keycodes from previously added keysyms will be reused. Re: TigerVNC#93
49bc636
to
f65433a
Compare
Re-based onto latest master branch.
Yes, changing layout via |
Also, only Xvnc assigns key name to added keys. x0vncserver simply updates the keysym. But if needed, same approach could be used in x0vncserver too. |
Finally got around to testing this. It works very well. Nice work! :)
That would be nice if you have the time. It's not a blocker for this work, though, so I'll go ahead and merge what we have. |
This is still a work in progress, but I am kinda stuck on how to handle Xvnc. Atleast x0vncserver works correctly. As proposed in #93 (comment), when all free keys has been used, it will start reusing the oldest key assigned by TigerVNC.
For Xvnc, I have tried a few things:
InputGlue.h
. This can work, but becomes very clunky. Control flow will be Xvnc/x0vncserver => common code => glue code in Xvnc/x0vncserver => and back again.common
to avoid having to implement a linked list in Xvnc.)Issue: #93