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

Overhaul keyboard input handling #37

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

dominikh
Copy link
Contributor

@dominikh dominikh commented Apr 6, 2017

Overhaul keyboard input handling to make it more suitable for full fledged text input, not just keybindings. In particular, we add support for more modifiers (Mode_switch, AltGr, numlock), add more functions to get direct access to keysyms and their names, and improve keysym stringification to handle Unicode.

The primary change here is that we do not use the unicode package to
operate on strings. Instead, we implement XCB's xcb_convert_case
function, which is a truer implementation of the specification, handling
only those keysyms it should.

In itself, this isn't a very useful change. It does, however, allow us
to return keysyms, instead of strings, from interpretSymList. This is
necessary to add support for handling numlock, which has to check
whether the keysym is in specific ranges.
KeysymName returns the raw, unchanged name of a keysym. For example, the
Compose file format has entries such as the following, which requires
knowing the actual keysym names:

  <Multi_key> <space> <parenleft>		: "˘"   breve # BREVE
External code that operates directly on keysyms, for example to handle
arrow or media keys, will want to compare keysyms to predeclared names.
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