Pages: [1]   Go Down
Author Topic: need the camand that presses a key.  (Read 939 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Sofia, Bulgaria
Offline Offline
Full Member
***
Karma: 0
Posts: 237
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!

 smiley
Logged

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

 smiley
Logged

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

London
Offline Offline
Sr. Member
****
Karma: 0
Posts: 330
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Try google:
http://www.google.co.uk/search?q=arduino+keyboard+emulator+site%3Aarduino.cc&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

Comes up with results like this:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1247772275

Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Mowcius
Logged

Pages: [1]   Go Up
Jump to: