+ Post New Thread
Results 1 to 8 of 8
How do you do....it? Thread, USB Button Run Shell Script in Technical; Hi All, Bit of a strange one. Does any one know of, or has made a Button (physical) that can ...
  1. #1
    bladedanny's Avatar
    Join Date
    May 2009
    Location
    Sheffield
    Posts
    806
    Thank Post
    129
    Thanked 133 Times in 100 Posts
    Rep Power
    47

    USB Button Run Shell Script

    Hi All,

    Bit of a strange one. Does any one know of, or has made a Button (physical) that can connect to a computer (preferably linux based) via USB that when pressed will execute a shell command?

    I've had a quick google and all I could find was the cheap 'Panic Button' toys. I'd want something similar button wise but want it to do more than open a screensaver etc.

    Would it be possible to hack apart a USB keyboard, solder a button bought at the local electric shop to the correct part of the keyboards circuit board and somehow have that execute the command?

    Not looking for anything solid just any ideas of how I might go about it.

    Thanks,

    Dan

  2. IDG Tech News
  3. #2


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,663
    Thank Post
    120
    Thanked 434 Times in 353 Posts
    Rep Power
    124
    Edugeek gave away some 'Emergency Launch Devices' at BETT a few years ago. They're just a single USB button that executes a key combination to launch the web site. They were provided by the USB Company, but they don't seem to do them anymore.

  4. Thanks to K.C.Leblanc from:

    bladedanny (12th September 2011)

  5. #3
    Jamman960's Avatar
    Join Date
    Sep 2007
    Location
    London/Kent
    Posts
    918
    Thank Post
    160
    Thanked 165 Times in 143 Posts
    Rep Power
    38
    I had a quick look a while back into re-programming the panic buttons, I think someone had managed it but can't remember how now...all they do is send key strokes ie WinKey+R, w,w,w,.,e,d,u,g,e,e,k,.,n,e,t,Enter

  6. Thanks to Jamman960 from:

    bladedanny (12th September 2011)

  7. #4

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    11,508
    Thank Post
    436
    Thanked 1,188 Times in 1,075 Posts
    Rep Power
    287

  8. #5

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    11,508
    Thank Post
    436
    Thanked 1,188 Times in 1,075 Posts
    Rep Power
    287
    Windows though I'm afraid.

  9. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    11,508
    Thank Post
    436
    Thanked 1,188 Times in 1,075 Posts
    Rep Power
    287
    USB Smart Button hack? - [H]ard|Forum

    Towards the bottom has more details on actually reprogramming the thing.

    Ben

  10. Thanks to plexer from:

    bladedanny (12th September 2011)

  11. #7


    Join Date
    Jul 2007
    Location
    Bradford
    Posts
    974
    Thank Post
    31
    Thanked 147 Times in 81 Posts
    Rep Power
    137
    Couldn't you just use some micro software to remap one of the less used function keys to do it?

    Might be a lot easier

    Edit : have used this for windows http://www.autohotkey.com/
    Wold have thought linux would have an alternative
    Last edited by LiamH; 12th September 2011 at 02:26 PM.

  12. Thanks to LiamH from:

    bladedanny (12th September 2011)

  13. #8
    bladedanny's Avatar
    Join Date
    May 2009
    Location
    Sheffield
    Posts
    806
    Thank Post
    129
    Thanked 133 Times in 100 Posts
    Rep Power
    47
    Hi,

    Thanks for all replies, email been down at work so not getting alert emails.

    What I did in the end was a bit of a mixture of all suggestions really. Bought a big button and little project box. I then ripped (read carefully took out the screws) open an old keyboard and found out what two contacts f8 went to and wired the button up to those.

    Then as LiamH said I just custom keyboard shortcut f8 to run the script.

    Job done. Works quite well too.

    Thanks all

SHARE:
+ Post New Thread

Similar Threads

  1. Shell script variable from .plist?
    By nicklec in forum Mac
    Replies: 2
    Last Post: 25th March 2011, 02:34 PM
  2. Can you run a script in a PDF?
    By GREED in forum Scripts
    Replies: 2
    Last Post: 2nd November 2010, 05:11 PM
  3. Run Shell Script BEFORE logon
    By mbrunt in forum Mac
    Replies: 4
    Last Post: 14th September 2010, 02:23 PM
  4. Replies: 16
    Last Post: 25th February 2010, 08:59 AM
  5. Replies: 1
    Last Post: 9th September 2009, 07:22 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •