Go Down

Topic: Lonardo ENTER vs. NUMPAD ENTER (Read 375 times) previous topic - next topic

anv

Sep 08, 2013, 10:40 am Last Edit: Sep 08, 2013, 11:11 am by anv Reason: 1
A am trying to create a simple program for sending texts to the PS3 using keyboard emulation of Leonardo.

It works but the ENTER key is not accepted by the console. I tryed with a real usb keyboard and the enter key in numeric keypad is not accepted by the console. Then, I must asume that Leonardo libraries are sending this key instead of the normal enter key.

I see in the code that KEY_RETURN is defined as 0xB0 but I checks the documentation about scancodes in internet (like http://www.quadibloc.com/comp/scan.htm) and the codes are very different, then I understand that throug usb the codes sent are different: i.e. The scancode for F1 is 07 but the key definitions in arduino's USBAPI.h says #define KEY_F1 0xC2

Any help please on finding the right code or locating the problem with the PS3?

Update: I found this http://www.mindrunway.ru/IgorPlHex/USBKeyScan.pdf but it says KP Enter is 58 and normal Enter is 28, but USBApi.h indicates KEY_RETURN=0xb0.



Nick Gammon

Try sending \n (newline), that is:

Code: [Select]
Keyboard.print ("\n");
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy