arduino-libraries / Keyboard

GNU Lesser General Public License v3.0
231 stars 160 forks source link

Wrong key with keyboard.print #7

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello,

I was trying some code with my ATmega32U4 and the Keyboard.h librarie, by adding and was asking me why by adding this line :

Keyboard.print("This pipe character : | ");

I'm getting this output for the pipe : µ

Thanks in advance

facchinm commented 7 years ago

Hi @keviiin38 , the Keyboard object behaves like a real keyboard, so the bytes it sends are "mangled" by the system keyboard mapping, locale and such. Probably, in your current configuration, the "pipe" key (\ as main function and | as alternate, just over "Enter" in en_US keyboard) is mapped to µ . For an improved experience, take a look at the advanced keyboards in https://github.com/NicoHood/HID