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. --get-state would also accept key, snd, led --value parsing would choose between numerical value and constant name mode through looking at the first character of the parameter. If its numerical then it would use it as a numerical value. (there is no risk of conflict here, because preprocessor constants cant start with a number) Thanks, Daniel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
