Reputation: 1901
I'm trying to use pyvbox to enter some text into a virtual machine, but it takes keyboard input as a list of keyboard scancodes. I'd like to convert a regular Python string into a list of scancodes.
I'm aware that I could probably brute force it by trying each scancode and seeing what I get, but I wondered if there's a library or similar out there. AFAIK, scancodes are keyboard layout dependant, so it would presumably need to be configured with a keyboard layout.
Upvotes: 1
Views: 1041
Reputation: 1792
There seem to be a scancode dictionary already defined inside the source code And if you wish to see the codes, you may use xev if you are on linux and try out various keys.
Upvotes: 1