Arduino typing

is it possible to have arduino output a key on your keyboard. what i mean is if i were to put a push button on arduino and when it was pressed it would print a w in notepad. anyone know?

Not directly. You can have a program running on the computer that acts as a go-between. Would that work for you?

Yeah that would be fine. I'm just wanting to put switches and button on arduino and have it correspond with a keystroke with a keyboard. So one button might be a the next button b and a switch that does z. A go between program would be perfect.

I've not used it myself but this one is mentioned frequently...

Here's a discussion of other potential solutions...
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1258067608

I've seen this one mentioned as well...
http://www.aacinstitute.org/downloads/aackeys/AACKeys.html

Thanks a million man. If I can't get it to work with one of these I apparently I don't know what I'm doing. Thanks again man.

I use AAC keys

Windoze does have its own serialkeys program (in accessibility options) which will let you do it without installing a new program.

Mowcius

Thanks for the info im gonna give AAC a try and see how it does.

Windoze does have its own serialkeys program (in accessibility options)

Is there a good reference source for this option to read about this before mucking with Windoze?

Lefty

Is there a good reference source for this option to read about this before mucking with Windoze?

Not that I know of... AAC keys uses the same commands and stuff I think but I have not used either extensively.

I use AAC keys for typing becuase it is easy to turn on and off... You don't have to click through 3 or 4 windows or something, a quick shortcut turns it on and a quick right click and close turns it off...

Mowcius

Would anyone know how-to use the ctrl, alt, or shift keys with aac and arduino? Say shift + m or ctrl + e.

Would anyone know how-to use the ctrl, alt, or shift keys with aac and arduino? Say shift + m or ctrl + e.

See http://trace.wisc.edu/docs/gidei/gidei_sh.htm for an explanation of the commands.

-Mike

Trust me I have read that document up and down. What i'm running into now is that you need an escape key to use shift,alt, or ctrl. ex:

Typing Specific Keys: each key is designated by a name. To type the key, use the Key Name in an escape sequence. An escape sequence is simply the ESCAPE character (ASCII 27, represented as "" below), followed by a sequence of other ASCII characters, and ending with the PERIOD character (ASCII 46, "."). (Note: Many AAC devices can generate an ESCAPE character using a combination of the control key plus a left bracket (e.g., control+[), which may appear on the AAC device display as "^[" .)

Key Name .
For example: pageup.

Other Key Actions: to perform other actions use escape sequences of the general form:

, command [ , Key Name 1 ] [ , Key Name 2 ] [ , Key Name 3 ] [ , Key Name 4 ] [ , Key Name 5 ] .

Valid keyboard commands are:

combine
used to type one to five keys "simultaneously".

, combine , ctrl , alt , del .

hold
holds the specified key(s) down until the next key is "typed".

, hold , shift .

I have tried everything i can think of and i cant get it to press shift or hold shift. What escape character am i supposed to use?

novaforme,

ESC is the name of a specific ASCII control character, decimal value 27, hex value 0x1b, octal value 033. One way to represent it in your program is with the octal character representation '\033'. For example, to do shift-m:

Serial.print("\033hold,shift.m");

I haven't tried that, but that's what the documentation seems to be saying. If you're just trying to get an uppercase M, I'd also try just sending an uppercase M and seeing what it does:

Serial.print("M");

Regards,

-Mike

Thanks Mike. I think I tried that but I'll try it again. It's not that I need a capital m but I'm using a program that needs the same keystrokes as ctrl + m or shift + h.... I'm using arduino as a gobetween for switches and buttons.

Ok it works now. I was putting the samething as you mike but it wasn't working. Turns out I wasn't putting the , between \033 and hold. Thanks for all your help with this guys. The arduino community is the best.

novaforme,

Good catch on the comma. I missed it, too. Glad it's working for you.

Regards,

-Mike

Thanks Mike and novaforme! this forum has been so useful! I have been trying to use the lock (keydown) and rel (keyup) commands in AACkeys but it just doesnt work :(.
To keep pressing down on the "w" key i used:
Serial.print("\033,lock,w.");
and to release it i used:
Serial.print("\033,rel,w."); Any suggestions? :slight_smile:

I think there are pINVOKE things you can do in c# where keys like ^ and & represent ctrl etc. You'll have to look it up, but it should be fairly easy to implement.