Page 1 of 1

GPIO: Convert closed contact to keypress?

Posted: Fri Jun 29, 2012 5:50 am
by gruso
I'm working on a hardware project that will include 4x momentary pushbuttons connected to GPIO. When a contact is closed, I want to send a keyboard press to the system (eg. the number '1'), which will be picked up by a third party application.

I found gpio-keys by reggie: ... =50&t=8842

It seems to match my needs, but in its current form (ie. source code) it doesn't match my abilities :P Can anyone advise on how to make use of reggie's code? Or is there an alternate approach?

(I could take the easy way out with one of these but that wouldn't really be in the spirit of the Pi.)

Re: GPIO: Convert closed contact to keypress?

Posted: Sat Jun 30, 2012 12:12 am
by gruso
Ok, looks like this is as simple as telling Python to send the key presses with os.system