Mac USB Panic Button - Working on Mac

nicksoper

macrumors member
Original poster
Mar 6, 2006
89
0
Cape Town
Hey There,
Last night I got given a USB Panic Button (Link to page here) but the software only works on PC.

I am not expecting anyone to write me any code, but it would be really nice if someone could point me in the right direction to read up about how to record a USB event on a mac, then run a script, and what kind of script would be suitable to run (I have dabbled in a bit of light Applescript previously)

If I get it working, I would then share it with fellow panic button mac users.

Nick
 

jared_kipe

macrumors 68030
Dec 8, 2003
2,967
1
Seattle
First things first, in SystemPreferences-> Language&Text-> InputSources
Check off the box for "Keyboard & Character Viewer".

Then open the keyboard viewer from the small icon by the clock.

This will allow you to see when "keys" are pressed/held down. Its possible this thing just acts as a keyboard and sends a key combo for their software to watch out for.
 

larkost

macrumors 6502a
Oct 13, 2007
534
1
If it does not simply present itself as a single-key keyboard, then you are probably out of luck. Writing drivers is not an AppleScript-esque exercise.
 

nicksoper

macrumors member
Original poster
Mar 6, 2006
89
0
Cape Town
Unfortunately the usb event does not present itself as a keyboard input.

Anyone got any ideas as to where to start programming an app that could pick this up?

It's a bit daunting, but I did do Java at uni, and I have been using PHP for the last couple of years. I could do with a new challenge.

Thanks for the help so far.

Installing X-Code, reading about Cocoa. Gonna see where that takes me.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
5

kainjow

Moderator emeritus
Jun 15, 2000
7,958
5
Well I got my hands on the device and figured I'd give it a shot. It was a little odd but I got it working, so I made an app that lets you run an AppleScript whenever the button is hit. Requires 10.6, you can download here. Source code available.

Have fun :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.