On Wed, Jul 13, 2011 at 09:50:24AM -0700, Dmitry Torokhov wrote: > On Wednesday, July 13, 2011 09:40:40 AM Daniel Drake wrote: > > On 13 July 2011 00:12, Peter Hutterer <[email protected]> wrote: > > > I think I'd prefer it merged into evdev, simply because we have all > > > the lookup tables there already. Which allows a state query for "Key > > > Comma" instead of the numbers, making it a nicer interface IMO. > > > > > > Ideally we could also make it parse KEY_FOO definitions, since those > > > are the ones programmers see and are most familiar with (as opposed > > > to the ones evtest currently uses). > > > > Thanks, I will work on this. > > What do you think about this design? > > > > evtest /dev/input/event0 > > Works as before. > > > > evtest --get-state sw --value 5 > > evtest --get-state sw --value SW_DOCK > > evtest --get-state sw --name Dock > > Get dock switch state. Return exit code 0 or 1 depending on state. > > > > I'd drop the last one. We already have a number and a name, providing > option for yet another name seems pointless. I'd probably converted > evtest standard mode to print names matching to those in input.h.
I agree. Just changing evtest to print KEY_FOO instead of the current "Foo" is probably the best long-term (easier to maintain, too). Cheers, Peter _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
