scancode-ascii-table.h: Support for QWERTZ and AZERTY keyboards. #46
Comments
|
I'm having the same issue. For Y/Z, it's as easy as changing every Y in the string you want to enter to a Z and vice versa, however, if you're trying to include characters such as the backslash, it gets very frustrating. I've tried digging around and finding a correlation between the scancodes in the file and the actual hardware scan codes, but I just don't get it |
|
I had the same issue, I modified a few files to comply with azerty layout. That's true I also had a hard time finding correlation between scancodes, and I didn't find any. My solution for finding "<>" was simply to write a for loop sending keystrokes for all scancodes from 1 to 255, and looking what each of these were doing until I see "<" on the screen. ">" is simply the same key with shift modifier. For altgr key combination, I found out that keycodes for keyboard characters fit on the 6 less significant bits of a char. The 1st msb is already used to apply or not shift modifier, I simply used the 2nd msb to apply or not altgr modifier. But there was a problem, "<" keycode is 100, and this is the only one that does not fit in 6 bits and so it use the bit I just used for altgr modifier. My solution for this is quite dirty but it works : I simply put a condition precisely for "<" and ">" characters case. Finaly this works, for testing I used the following line : DigiKeyboard.println("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"); and all characters works fine. Find the files for azerty layout attached. (added .txt to comply with file post requirements) DigiKeyboard.h.txt I suppose you could use the same process for any keyboard layout. |
|
@Fardenco You're right on the codes of the ASCII relevant keys, which are all encoded with values less than 0x65. Thus the second MSB could be used. I haven't done this for a simple reason. The USB descriptor used by DigiKeyboard.h is restricted to send values up to dec 101 (0x65). I changed the descriptor to allow sending values up to dec 231. This allows sending keycodes grater than 0x65 (most of them don't belong to PC AT keyboard, see USB HID keyboard usage table for reference). In the end this allowed me for example to send key 0x80, which on my Linux targets results in a Volume Up keypress and works out of the box with an USB descriptor fix. See here for details. |
|
Oh, that's why I did not managed get the media keys working ! |
|
Hi everyone, I used Fardenco's excellent previous work and started on a mapping for a qwertz-Layout. It's still not perfect, but most keys work. Known to not work yet: §|^´`äöüÄÖÜ As of right now, this is perfectly fine for me so in case anyone still looking for a mapping, I wanted to share. Feel free to work out the remaining issues. See the example string below to see what works und what doesn't:
DigiKeyboard.h.txt Have fun! Sibi |
|
Hello, I am new to arduino. Could you help me to use thoses libraries? How to change the orginal one? I tried to replace the files on my hard drive but i could not find them. Do you know where they are? Thank U. |
|
You'll find these files in the DigisparkKeyboard library folder. |
|
hi and thank you first for your work! |
|
For anyone still having trouble with this: use duck2spark. |
|
This is great, thank you for sharing |
|
I am not being able to use the TAB key. I have tries KEY_TAB after giving define KEY_TAB |
|
Use https://github.com/ArminJo/DigistumpArduino, this has an extended keyboard example with international layout support. @likeaguest Can you please close the issue? Thanks |
By now, scancode-ascii-table.h is just supporting the us qwerty keyboard layout. When inserting a DigiSpark using the DigiKeyboard lib into a computer with qwertz, "y" changes to "z" for example.
There should also be an option for qwerty and azerty keyboards. I would love to do it myself, but I don't really get the idea of how it is working.
The text was updated successfully, but these errors were encountered: