+ 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
    1,296
    Thank Post
    191
    Thanked 309 Times in 230 Posts
    Rep Power
    170

    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. #2


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,662
    Thank Post
    120
    Thanked 433 Times in 352 Posts
    Rep Power
    126
    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.

  3. Thanks to K.C.Leblanc from:

    bladedanny (12th September 2011)

  4. #3
    Jamman960's Avatar
    Join Date
    Sep 2007
    Location
    London/Kent
    Posts
    995
    Thank Post
    187
    Thanked 198 Times in 158 Posts
    Rep Power
    47
    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

  5. Thanks to Jamman960 from:

    bladedanny (12th September 2011)

  6. #4

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,568
    Thank Post
    721
    Thanked 1,682 Times in 1,497 Posts
    Rep Power
    432

  7. #5

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,568
    Thank Post
    721
    Thanked 1,682 Times in 1,497 Posts
    Rep Power
    432
    Windows though I'm afraid.

  8. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,568
    Thank Post
    721
    Thanked 1,682 Times in 1,497 Posts
    Rep Power
    432
    USB Smart Button hack? - [H]ard|Forum

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

    Ben

  9. Thanks to plexer from:

    bladedanny (12th September 2011)

  10. #7


    Join Date
    Jul 2007
    Location
    USA
    Posts
    1,068
    Thank Post
    50
    Thanked 164 Times in 95 Posts
    Rep Power
    144
    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.

  11. Thanks to LiamH from:

    bladedanny (12th September 2011)

  12. #8

    bladedanny's Avatar
    Join Date
    May 2009
    Location
    Sheffield
    Posts
    1,296
    Thank Post
    191
    Thanked 309 Times in 230 Posts
    Rep Power
    170
    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. Run Shell Script BEFORE logon
    By mbrunt in forum Mac
    Replies: 5
    Last Post: 29th April 2014, 07:27 PM
  2. Shell script variable from .plist?
    By nicklec in forum Mac
    Replies: 2
    Last Post: 25th March 2011, 02:34 PM
  3. Can you run a script in a PDF?
    By GREED in forum Scripts
    Replies: 2
    Last Post: 2nd November 2010, 05:11 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
  •