I am looking to make something that will allow me to record keystrokes and play them back (like simple Windows software does) but I need to be standalone - All stored on the Arduino. Is that something this little puppy can do?
If not. I was playing with the basic keyboard commands but I was wondering is there anything that will display or record my keystrokes in code forum so I can just paste it into my sketch to play it back? Thank you
What is the source of the keystrokes - the ide serial monitor ? a seperate keyboard?
Shouldn't be too hard.
Allan
Sorry for the delay in my response. I did not get an email notification. I was not subscribe to the thread that is now fixed.
As for the project yes I am essentially looking to have the Leonardo type just like a USB keyboard would. This is going to plug into an android powered device. It would be something that would take about two minutes or so and it would have to have the pauses and use all the same keystrokes that I would use. Kind of like in macro recorder on a Windows computer but built into a Leonardo.
Thank you for any help you can offer
The hard part of this is reading a USB keyboard, you require a host shied for that. If you have the old style of keyboard that makes things a lot simpler. The recording memory however is not too long as you require a keystroke and time stamp data and have to fit that into 2K of memory. You could probably get away with 3 bytes per keystroke.
I have no problem using a PS2 keyboard if that is what you mean by an old style keyboard. (round plug) - Or do you mean really really old like serial or something?
also, I dont really need it to be changed all the time. I would program the key sequence I need then setup a button to play it back. It would be a total of maybe 100 keystrokes spread out over 2 mins or so.
-- not sure what you mean by 2.5K SRAM--
I could most definitely use the basic keyboard.write stuff in Arduino IDE.. But the hard part there is programing all the keystrokes (mainly timing all the delays).. So i wonder if there is a program that can record real time my keystrokes and convert that into code that the Leonardo can play back with the basic Keyboard.Write commands. Thanks everyone for your help.
--
The project is setting up hundreds of identical android devices in a very specific way. I have it quite streamlined but it still required me to type a few things that I could (or should be able to) easily automate.
Sorry to post 3 times in a row - But I wonder if there is not a bluetooth sniffer or something that can intercept and record the signal from a wireless keyboard?
ENRKyle20:
I could most definitely use the basic keyboard.write stuff in Arduino IDE.. But the hard part there is programing all the keystrokes (mainly timing all the delays).. So i wonder if there is a program that can record real time my keystrokes and convert that into code that the Leonardo can play back with the basic Keyboard.Write commands. Thanks everyone for your help.
--
The project is setting up hundreds of identical android devices in a very specific way. I have it quite streamlined but it still required me to type a few things that I could (or should be able to) easily automate.
There are plenty of Arduino programs that use the old PS2 keyboard for input. I have one on my CW(Morse code) keyer.
May I suggest you store the resulting key/time table in an SD card. You will need a program to edit the data and make corrections and adjust the delay somewhere for sure!
Paul
I have no problem using a PS2 keyboard if that is what you mean
Yes it was.
But the hard part there is programing all the keystrokes (mainly timing all the delays).
No that is simple, you do not use a time delay you use the millis() timer to add a time stamp to each keystroke you record. Then when you hit the record button you make a note of the time given by the millis() timer. Then on each keystroke you store the difference between the time now and the time at the start.
Then when you hit the reply you again take the time and use this to add to the time stamp value to get the time the millis timer has to advance to before that keystroke is replayed, that is sent out.
So i wonder if there is a program that can record real time my keystrokes and convert that into code that the Leonardo can play back with the basic Keyboard.Write commands.
Yes that is the code you write.
The closest I have to that is one that does something similar only with MIDI notes. It is in my book:-
Listing Chapter 4 - 8.
Now where getting somewhere. This is all good stuff. Thank you so much.
I think I found info on what I was originally looking for, but this is over my head:
EXTERNAL LINK
(and to complex for my simple task)