Hello,
I want to be able to translate a string to keycode to write it with Xlib (to simulate user action on linux). The keycode are not the ascii but the code you get when you do use xev on
linuxKeyPress event, serial 33, synthetic NO, window 0x6400001,
root 0x13c, subw 0x0, time 51212100, (259,9), root:(262,81),
state 0x0, keycode 24 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XmbLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False
for exemple the keycode for 'a' is 24
I can easly detect if the letter is upercase and then make a combination ALT+lowercase(letter) but I don't know how to get the keycode.
One solution would be to be a list of every combination (a=24, b=56, c=54,...) but would be better if there is a function.
I'm using an azerty keyboard. Is the keycode for the same letter different on an qwerty keyboard ?
thank you