[PATCH evtest] Add evstate tool for evdev state querying

Dmitry Torokhov dmitry.torokhov at gmail.com
Wed Jul 13 09:50:24 PDT 2011


On Wednesday, July 13, 2011 09:40:40 AM Daniel Drake wrote:
> On 13 July 2011 00:12, Peter Hutterer <peter.hutterer at who-t.net> 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.

-- 
Dmitry


More information about the xorg-devel mailing list