-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Leonardo keyboard API only allows ASCII input #1386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Closing, looking at Keyboard.h the following API's are present: size_t press(uint8_t k);
size_t release(uint8_t k);
void releaseAll(void); |
How would you modify these APIs in Keyboard.h to achieve a conversion? |
Re-opening this, on closer inspection raw key codes are still not supported currently. |
look at pull request 1391 it contains the code for the raw key codes |
We decided that the arduino IDE keeps the library simple while my HID Project will add all those new features. That was made with 1.6.6 or 1.6.7 (?) when the new usb core came out. I think you can close this issue as "wont fix" |
@NicoHood - I see you've used my international keyboard layouts code in your project. Please be aware the license for that code includes a requirement to have Teensy installed in the Tools > Boards menu. It may be used on non-Teensy boards, but only when full Teensy support is available to the user in the menu. |
which international keyboard layouts code? |
oh that brings back lots of memories for the mooltipass project... we had to make a python script to generate Look Up Tables between ascii codes and keyboard layouts... good times. |
IMHO it's still badly solved in the Core. |
@weizenspreu feel free to buils something on top of HID-Project to use different layouts. It should be possible. |
The Arduino/Genuino Leonardo is EOL already, so I won't bother any longer. |
Who said that? Those avrs are still widely used. Especially those with a 328 and a 32u4. |
The Arduino Leonardo keyboard API only allows ASCII input and then converts it to the actual key codes sent to the computer via USB. This is a huge problem because it fails for non-QWERTY systems (e.g. in Germany, France) and even for non-Windows systems (e.g. when it comes to special characters on a Mac).
Take this code as a small example. On a German computer this will actually output "qwerty".
It would be great to have something like Keyboard.pressKeycode() and Keyboard.releaseKeycode() and actually do the conversions ourselves. That way we could ask the user what keyboard layout he/she has and do everything appropriately.
The text was updated successfully, but these errors were encountered: