Leonardo: Keyboard write > wrong character

hi,

i think there are some problems with ASCII/HDI
and leonardo on computers with different languages.

I wanted to use Keyboard.print(">"); and got: ":"
the same with Keyboard.write(62);

Is there a solution to this problem?

Nischi

Are you, perhaps, using a non-English keyboard layout? The Leonardo sends key codes (Shift 0x37) for the '>' character because that is the key code for the key that has '.' (unshifterd) and '>' (shifted). It is up to the software on the system receiving that key code to convert the key and shift to a glyph (character).

You can change the table in hardware/arduino/cores/arduino/HID.cpp to match your keyboard layout.

hi,

my keyboard layout is german.

i have now written a small programm on arduion to output "all" characters
but also here no "<" and ">" in the german layout.
When i change to the english keyboard layout on windows i get the "<" and ">" character.

is it possible to get "<" and ">" in the german keyboard layout?

alex

German Layout

. . -32-
.!. -33-
.Ä. -34-
.§. -35-
.$. -36-
.%. -37-
./. -38-
.ä. -39-
.). -40-
.=. -41-
.(. -42-
.`. -43-
.,. -44-
.ß. -45-
... -46-
.-. -47-
.0. -48-
.1. -49-
.2. -50-
.3. -51-
.4. -52-
.5. -53-
.6. -54-
.7. -55-
.8. -56-
.9. -57-
.Ö. -58-
.ö. -59-
.;. -60-
.´. -61-
.:. -62-
._. -63-
.". -64-
.A. -65-
.B. -66-
.C. -67-
.D. -68-
.E. -69-
.F. -70-
.G. -71-
.H. -72-
.I. -73-
.J. -74-
.K. -75-
.L. -76-
.M. -77-
.N. -78-
.O. -79-
.P. -80-
.Q. -81-
.R. -82-
.S. -83-
.T. -84-
.U. -85-
.V. -86-
.W. -87-
.X. -88-
.Z. -89-
.Y. -90-
.ü. -91-
.#. -92-
.+. -93-
.&. -94-
.?. -95-
.^. -96-
.a. -97-
.b. -98-
.c. -99-
.d. -100-
.e. -101-
.f. -102-
.g. -103-
.h. -104-
.i. -105-
.j. -106-
.k. -107-
.l. -108-
.m. -109-
.n. -110-
.o. -111-
.p. -112-
.q. -113-
.r. -114-
.s. -115-
.t. -116-
.u. -117-
.v. -118-
.w. -119-
.x. -120-
.z. -121-
.y. -122-
.Ü. -123-
.'. -124-
.*. -125-
.°. -126-
.a. -140-
.b. -141-
.c. -142-
.d. -143-
.e. -144-
.f. -145-
.g. -146-
.h. -147-
.i. -148-
.j. -149-
.k. -150-
.l. -151-
.m. -152-
.n. -153-
.o. -154-
.p. -155-
.q. -156-
.r. -157-
.s. -158-
.t. -159-
.u. -160-
.v. -161-
.w. -162-
.x. -163-
.z. -164-
.y. -165-
.1. -166-
.2. -167-
.3. -168-
.4. -169-
.5. -170-
.6. -171-
.7. -172-
.8. -173-
.9. -174-
.0. -175-
. . -180-
.ß. -181-
.´. -182-
.ü. -183-
.+. -184-
.#. -185-
.#. -186-
.ö. -187-
.ä. -188-
.^. -189-
.,. -190-
... -191-
.-. -192-

English Layout

E. . /32/
.!. /33/
.". /34/
.#. /35/
.$. /36/
.%. /37/
.&. /38/
.'. /39/
.(. /40/
.). /41/
.*. /42/
.+. /43/
.,. /44/
.-. /45/
... /46/
./. /47/
.0. /48/
.1. /49/
.2. /50/
.3. /51/
.4. /52/
.5. /53/
.6. /54/
.7. /55/
.8. /56/
.9. /57/
.:. /58/
.;. /59/
.<. /60/
.=. /61/
.>. /62/
.?. /63/
.@. /64/
.A. /65/
.B. /66/
.C. /67/
.D. /68/
.E. /69/
.F. /70/
.G. /71/
.H. /72/
.I. /73/
.J. /74/
.K. /75/
.L. /76/
.M. /77/
.N. /78/
.O. /79/
.P. /80/
.Q. /81/
.R. /82/
.S. /83/
.T. /84/
.U. /85/
.V. /86/
.W. /87/
.X. /88/
.Y. /89/
.Z. /90/
.[. /91/
.. /92/
.]. /93/
.^. /94/
._. /95/
.. /96/ .a. /97/ .b. /98/ .c. /99/ .d. /100/ .e. /101/ .f. /102/ .g. /103/ .h. /104/ .i. /105/ .j. /106/ .k. /107/ .l. /108/ .m. /109/ .n. /110/ .o. /111/ .p. /112/ .q. /113/ .r. /114/ .s. /115/ .t. /116/ .u. /117/ .v. /118/ .w. /119/ .x. /120/ .y. /121/ .z. /122/ .{. /123/ .|. /124/ .}. /125/ .~. /126/ .a. /140/ .b. /141/ .c. /142/ .d. /143/ .e. /144/ .f. /145/ .g. /146/ .h. /147/ .i. /148/ .j. /149/ .k. /150/ .l. /151/ .m. /152/ .n. /153/ .o. /154/ .p. /155/ .q. /156/ .r. /157/ .s. /158/ .t. /159/ .u. /160/ .v. /161/ .w. /162/ .x. /163/ .y. /164/ .z. /165/ .1. /166/ .2. /167/ .3. /168/ .4. /169/ .5. /170/ .6. /171/ .7. /172/ .8. /173/ .9. /174/ .0. /175/ . . /180/ .-. /181/ .=. /182/ .[. /183/ .]. /184/ .\. /185/ .\. /186/ .;. /187/ .'. /188/ .. /189/
.,. /190/
... /191/
./. /192/

nischi:
here no "<" and ">" in the german layout.

is it possible to get "<" and ">" in the german keyboard layout?

How do you type < and > on your German keyboard?

I guess you could use the Windows trick of holding down the ALT key and typing a character code: Alt-60='<' and Alt-62='>'. You just have to figure out how to use the ALT key in the USB keyboard emulation.

The key code KEY_LEFT_ALT (0x82 or octal 202) represents the left shift key. Perhaps "\20260" would enter a '<' but I'm not sure.