Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
How would I determine what key codes to fire off to generate a specific character?
So on my desktop I use a combination of KEY_LEFTSHIFT + KEY_SEMICOLON to generate a colon (:).
Oh also this is using UInput.
These things are determined by the kernel keyboard driver and the currently loaded translation table. Here is a good explanation on superuser.com: http://superuser.com/a/290149
I'm not aware of a python library that can do the parsing for you.
Best of luck,
Hmm, okay what would your advice be if dumpkeys doesn't work?
This is with Ubuntu Touch on a device (Nexus 4), this is my understanding on
The issue with dumpkeys:
So with me not being able to use dumpkeys does that complicate things? My
And if this is true for dumpkeys, how does it effect python-evdev? I mean I know
Sorry for the long winded question, I'm wanting to solidify my understanding.
Hello and sorry for the late reply.
Android seems to be doing things differently. Here are a few documentation links that I found useful in understanding what's going on:
By parsing the key layout files, one should be able to map the evdev keycodes to their corresponding characters. I suppose there is a Java API for this, the implementation of which you can look into for more details.
I have no idea if this works on Android, but I'm using unicode escape sequences (Ctrl-Shift-U-) to write characters and it seems to work pretty well
Just in case it is useful to someone, someday: