Closed RobertoD91 closed 1 year ago
I cannot reproduce the issue.
First of all, I must admit that I wrote this layout file without having ever touche an Italian keyboard. That being said, all the sources I found online (e.g. 1, 2, 3, 4, 5) agree on this:
the key <> is in the lower-left corner of the keyboard, between Shift and Z
the key \| is in the top-left corner, right next to 1!
Is that the case with the keyboard you are using?
I tried your test program, after setting my keyboard layout to Italian (as known by my Ubuntu OS). When I type <
, >
, \
and |
, I do get the same characters echoed back by my Micro.
Here is a minimal test program:
#include <Keyboard.h>
void setup() {
Keyboard.begin(KeyboardLayout_it_IT);
delay(5000);
Keyboard.print("<>\\|");
}
void loop() {}
I tried it on my Micro, while setting my keyboard layout at the OS level to either Italian or English (US). Here is what the Micro typed into my text editor, as a function of the OS keyboard setting:
<>\|
<>`~
@RobertoD91: Could you try this on your device?
@everybody: Could some one who does use an Italian keyboard try it?
@RobertoD91: Could you try this on your device?
Sure, tested with WHID, with unmodified Keyboard library 1.0.4 :
Ita: \|<>
Eng (US): §±`~
I found an old Arduino Yun, tested the same code, same issues.
Sorry, my fault. I had accidentally set the keyboard as ANSI instead of ISO on all my computer (it wasn't a system-wide setting).
The library is ok, tested with WHID and Arduino Yun.
Sorry
Hardware: The Atmega32u4 inside the WHID https://github.com/whid-injector/WHID
Software: Arduino IDE 1.8.19 Keyboard Library 1.0.4
Simple test program:
Issue: the character
<
is replaced with\
and viceversa also>
is replaced with|
and viceversaFix? edit the file in
Documents/Arduino/libraries/Keyboard/src/KeyboardLayout_it_IT.cpp
replacing0x32
with0x35
and viceversaI don't have another hardware for testing, i don't know if the problem is in the library or in the WHID.