This patch makes the eject button on a powerbook post-feb-2005 work with pbbuttonsd. I'm pretty sure this could also be rolled into a test_bit statement, but I've never programmed the input layer, so .... With this patch, you don't even need to change the default config file because the keycode is still 161.
--- orig/src/input_manager.c 2004-09-24 17:25:51.000000000 +0200 +++ mod/src/input_manager.c 2005-03-23 21:03:38.346817376 +0100 @@ -204,7 +204,7 @@ sprintf(filename, "/dev/input/event%d", n); if ((fd = open(filename, O_RDONLY)) >= 0) { ioctl(fd, EVIOCGBIT(0, EV_MAX), bit); - if (test_bit(EV_KEY, bit) && test_bit(EV_REP, bit)) { + if ((test_bit(EV_KEY, bit) && test_bit(EV_REP, bit)) || (bit[0] == 0x13)) { ioctl(fd, EVIOCGID, id); if (id[ID_PRODUCT] != base->evdevs[m].product || id[ID_VENDOR] != base->evdevs[m].vendor) { -- Johannes Berg <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part