Go Down

Topic: need the camand that presses a key. (Read 1 time) previous topic - next topic

jbbiz

hi every one. im looking for a snipit of code that will press a key. if any one knows this code PLEASE TELL ME. thanks.

mircho

It is unclear what you want. Please describe more.
What key, for example?

cr0sh

Nothing short of a mechanical actuator of some sort will "press a key"; perhaps you mean "send a keystroke to my application"?

You need to supply more detail; the Arduino alone can't send a keystroke - you could send a character down the USB serial to the PC, where software there could interpret it and then perform the action to send a keystroke (depending on your operating system, and the language + libraries you use there, this may or may not be a straightforward task).

Are you expecting an Arduino to send this request, or are you interested in something to do it under Processing? Java? Some other language? Many missing details are needed...

Thank you!

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

jbbiz

as a reply to crOsh i am looking for something that sends a keystroke to the computer via usb. any sugjestions on how to do this?

cr0sh

Serial.print() or Serial.println()?

Understand that the Arduino is connected to the PC via a serial to USB conversion chip, and the operating system treats it as a serial port, not as a USB HID (Human Interface Device), which is what a keyboard is recognized as.

You would need software on the PC to take that keystroke sent via serial and turn it into an actual "keystroke"; here is a thread where such similar software is presented - there are other options out there as well (the majority for Windows - I don't think I have seen anything for Linux or Macs, but I haven't looked):

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265310489/2

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


mowcius

things like AAC keys for windoze.
Send serial command to computer and AAC Keys interprets it into a key press.

Mowcius

Go Up