-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Keyboard.press(KEY_RETURN); types "(" instead of {ENTER} #92
Comments
You can see a similar discussion and my response at: #89 (comment) Keyboards sends keyboard scancodes, there is no concept of ASCII or any type of char, it is just a code for the pressed key. On page 54 of http://www.usb.org/developers/hidpage/Hut1_12v2.pdf you see scancode 40 in decimal is Enter |
German layout is not supported and covered in another issue. Feel free to implement it. |
For German layout support please see my comment in issue 22 |
I solved the problem by not using your library and changing the Keyboard.cpp instead. These are the changes I made and from what I've noticed, it all works pretty well including the ALTGR key on the german keyboard (it's used for these symbols: €²³{[]}~|)
|
For AltGr and special case 0x64 you do not need to modify the Keyboard the library.
For some special characters you can use Keyboard.press() with corresponding codes by creating a lookup table or something else:
For other keys you can use Keyboard.press() with existing definitions. |
The headline sums it up pretty well, but I'll further elaborate:
I tried this using a German and the US keyboard layout, but after I looked at the files "TeensyKeylayouts.h" and "ImprovedKeylayouts.h", I noticed that KEY_ENTER always returns 40, which is, - I suppose - an ASCII value.
And that Ascii value translates to "(".
I don't quite get if I'm missing out anything or if that's really a bug no one ever noticed before me ...
EDIT: Typing KEY_RETURN with the default Keyboard.h library works perfectly; Using an Arduino Leonardo
The text was updated successfully, but these errors were encountered: