Obtain keyboard layout and keysyms with XCB
I'm creating an on-screen keyboard for Linux integrated in a simple Window
Manager. I'm currently using XCB, and now I want to make the fake
keystrokes. Everything works fine using xtest extension, except for the
detail that I can't get the true keycodes from the keysyms I want to put.
Currently I'm using xcb_key_symbols_get_keycode, and then I use
xcb_key_symbols_get_keysym to know which modifier I need to get that
symbol. This works fine when the configured keyboard is the USA one. But I
have a spanish keyboard, and this call only returns the USA
configurations. In spanish keyboards several symbols are obtained with the
right alt (altgr), but the former calls doesn't seem to support it.
So, how can I get the keycodes needed to get any keysym? I presume that I
need the XKB extensions, but I've been unable to find them for XCB, and I
don't want to rewrite the whole window manager for XLib.
Thanks.
No comments:
Post a Comment