From: C. M. <cm...@fr...> - 2006-02-20 19:55:48
|
Howdy y'all-- I tried to make the keypad support as extensible as possible, but I've only got a Crystalfontz 635 at the moment. It's built with 6 buttons, and they generate different events for both press & release. The attached patch adds a new keypad widget and a generic keypad driver. The widget is unique because I believe it's the only one that doesn't update with a timer, instead, it uses, you guessed it, the key pad. :) The generic driver is useful for mapping key scan codes from the hardware into normal positions UP, DOWN, LEFT, RIGHT, etc. so that if you swap hardware you won't need to re-write the configuration file that much. Here's what some of the configuration might look like: Widget keyup { class 'Keypad' position 'up' state 'pressed' expression somevar = somevar-1 } Widget keydown { class 'Keypad' position 'down' state 'pressed' expression somevar = somevar+1 } Layout partial_example { Keypad1 'keyup' Keypad2 'keydown' } It would be great to get some feedback. Particularly if this is unworkable for other displays with buttons. Thanks, --Chris |