Keypresser?

Hi,

I have a computer over which I have no administrator rights and which locks after 5 minutes of inactivity. I want to find or make a device that will simply press a specific key (control or shift) on my keyboard every 1 minute to keep the computer from inadvertently locking. I have been unable to find such a device, so I guess I'll have to make it. Lastly, the device should be AC powered.

I'm guessing that I can use Arduino to accomplish this, but how difficult would it be?

How would you go about solving this problem?

Please advise.

Thanks,

si

Just an Arduino with a servo could do the job I guess :)

Okay, so from your reply it would seem fairly simple.

I see the links you provided, but I am new to Aduirno. How do I get started?

Is there a marketplace for custom Arduino solutions that one can simply contract for? Depending on how much effort it would take to build myself, perhaps I would be better off just paying someone to build it for me.

Thanks,

si

http://www.youtube.com/watch?v=Yk71GY02diY

Yes, thank you for the video. But, according to wikipedia:

"If a glass of water is placed so that the beak dips into it on its descent, the bird will continue to absorb water and the cycle will continue as long as there is enough water in the glass to keep the head wet. However, the bird will continue to dip even without a source of water, as long as the head is wet, or as long as a temperature differential is maintained between the head and body."

I don't know how one would keep the head wet in the situation for which I am seeking a solution. So it doesn't appear that this would be a viable solution unfortunately.

Thanks,

si

I have a computer over which I have no administrator rights and which locks after 5 minutes of inactivity. I want to find or make a device that will simply press a specific key (control or shift) on my keyboard every 1 minute to keep the computer from inadvertently locking.

Sounds like you are trying to defeat somebodys computer security setup. Good luck if it is your employer.

Bird seeds and open window? ;)

Okay, let me try a different tact:

How much would it cost to have you build a "key presser" for me, based on Arduino and some kind of servo that can press the control or shift key on a laptop on a regular timed interval (~1-5 minutes), and be AC (or perhaps USB) powered?

Thank you,

si

I believe you can set up an uno as a usb hid device, could this be as simple as doing that and sending info as a keyboard or even a mouse wiggle every couple of minutes? Might be annoying if you leave it plugged in while using the computer but will work off usb power.

Sounds interesting, but what is an uno?

Thanks,

si

The most recent revision of the basic arduino hardware, it has a different chip for communicating with the computer which can be reflashed to act as a hid device.

Wow, cool, that sounds like a much better solution. The laptop will recognize an externally attached USB mouse and or keyboard, so this sounds like a much more elegant solution than what I had in mind. Thank you!

I know close to nothing about electronics in general, or Arduino for that matter, but I am a quick learner well-motivated. Could you please point me in the right direction as to where to start on this solution?

Thank you!

si

http://www.google.com/search?q=arduino+uno+hid+mouse

Sorry, I only know it can be done in theory, I've never had the need to try it myself.

I realize this is not an arduino solution, but sometimes out of the box thinking may work / help.

If you are in a normal office with Excel, this script I tossed together in a few mins may do the trick.

In the Excel menu select …

  • Tools - macro - visual basic editor
    Then in “Workbook” enter this …
Public Sub PauseFor(theSeconds As Integer)
    Dim PauseTime, Start
    PauseTime = theSeconds    ' Set duration in seconds.
    Start = Timer    ' Set start time.
    Do While Timer < Start + PauseTime
        DoEvents    ' Yield to other processes.
    Loop
End Sub

Public Sub RunKeyboard()
 For i = 1 To 300
    Call SendKeys("{ESC}") ' send esc to not send funcky chars if someone chats you while away.
    'note also that this may press esc making your chat window go away, so only some testing will you
    '  know for sure the safest characters to use
    
    Call PauseFor(180) '3 minutes - extend or shrink as needed
 Next
End Sub

In the Excel menu select …

  • Tools - Macro - Macros
    Select RunKeyboard from the list and click “Run”

This will press the esc key every 3 minutes. The idea being if you typed in X or something and someone chats you then the outputted fake keystrokes would go right into the chat window. If you use a non-software solution - be sure you take this into account if you run an active chat session.

Also notes that this will send keys into any open application, so remember to turn it off.

How to turn off:

In the Excel menu select …

  • Tools - macro - visual basic editor
  • press the stop icon (play / pause / stop on top).

May not work in your case but may be worth a shot.

I will try it! Thank you very much for your out-of-the-box contribution!

Cheers,

si

Holy cow! It worked!!! :open_mouth:

You, sir, are brilliant!

You rock, marklar!

Thank you very much!

si

By the way, revisiting your original question, yes, that is possible!

growler was on the right track - the new Arduino board is capable of mimicking (some may say spoofing) HID devices like keyboards and mice. However, actually doing so has been a little more advanced than what you should probably jump into right now.

However, the geniuses over at PJRC.com have developed another board called the Teensy that IS able to act like keyboards and mice, and its really, really easy to work with. Plus, its super cheap, tiny, and can be built into a USB jump drive :)

Check out: http://www.pjrc.com/teensy/

Here's an example of exactly what you're wanting to do: http://www.pjrc.com/teensy/td_mouse.html

Good luck!

Cool, thanks for closing the loop with this information!

For now, my immediate problem has been ressolved, but I will keep this in mind if another problem arises.

Cheers,

si