Christoph Bartelmus wrote:
> Paul Bender "pebender@..." wrote:
>> Attached is a patch that fixes the uinput output device key range
>> supported. First, rather than limiting the valid keys to something less
>> than KEY_UNKNOWN, it checks input_map.inc.
> Ok. Can anyone explain what is the practical use for UI_SET_KEYBIT anyway?
One thing that it does is enable the application connecting to the
uinput device to determine what keys are supported. For example, an
applications (such as Xorg) can use the information to determine what
mouse/joystick buttons are present.
>> Second, just as is done in
>> the commit
>> .20&r2=5.21>, it discards values between BTN_MISC and BTN_GEAR_UP as they
>> are mouse not keyboard values.
> Why would you want to hinder the user from generating these events if he
> wants to?
Mouse button events are forwarded to the mouse uinput device created by
the referenced commit. Forwarding mouse button events to the non-mouse
uinput device as well would mean that the events would be duplicated.
This would be problematic for most (if not all) programs that connect to
the uinput devices. For example, Xorg would end up seeing two mouse
button events (one from each uinput device) each time a mouse button is