Translate Keyboard Layout With Python
Solution 1:
In short: it is not possible.
The library doesn't support that, let me elaborate a little further:
I've generated a "lookup table" (using the hak5 files mentioned in the question) which allowed me to check which key + modifiers to use to represent a given character in a given layout (quite of a good piece of software actually); it was a big let down for me to find out that the library supported the "shift" modifiers only (while in other layouts alt-gr is needed). The "keystroke" is coded in the following way: 7-bits are used to represent the ASCII code of the character (obviously it only supports the 7-bit ASCII characters in the US keyboard), while the most significant bit represent whether or not the modifier is used.
TL;DR: DigiKeyboard supports one modifiers only, making it good for US layout (or similar) only.
A quick and dirty workaround it to use this tool here to translate a rubbery ducky script in a digispark one using the tools the hak5 team wrote.
Post a Comment for "Translate Keyboard Layout With Python"