I have written a linux input driver for a front panel.
We have mapped the front panel keys to BTN_0 -> BTN_9
When DirectFB linux_input module is used the get_device_info function does
not seem to recognise these buttons.
I looked into this function and there is this section:
if (test_bit( EV_KEY, evbit )) {
int i;
/* get keyboard bits */
ioctl( fd, EVIOCGBIT(EV_KEY, KEY_MAX), keybit );
/** count typical keyboard keys only */
for (i=KEY_Q; i<KEY_M; i++)
if (test_bit( i, keybit ))
num_keys++;
for (i=KEY_OK; i<KEY_MAX; i++)
if (test_bit( i, keybit ))
num_ext_keys++;
for (i=BTN_MOUSE; i<BTN_JOYSTICK; i++)
if (test_bit( i, keybit ))
num_buttons++;
}
The code obviously does not look for the complete range of BTN
events(input.h in linux kernel). If I change the last section to read
for (i=BTN_MISC; i<BTN_GEAR_UP; i++)
if (test_bit( i, keybit ))
num_buttons++;
Then the complete rane of buttons are recognised.
Am I doing the correct thing? It there any reason why this could not be
patched for DFB-1.0. If not i will submit a patch
Cheers
Dan Laird
--
View this message in context:
http://www.nabble.com/linux_input-Driver-not-seeing-my-button-presses...-tf2690668.html#a7503107
Sent from the DirectFB Dev mailing list archive at Nabble.com.
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev