===== net/bluetooth/hidp/core.c 1.3 vs edited ===== --- 1.3/net/bluetooth/hidp/core.c 2004-12-26 19:19:32 +01:00 +++ edited/net/bluetooth/hidp/core.c 2005-01-23 10:01:48 +01:00 @@ -74,6 +74,8 @@ 150,158,159,128,136,177,178,176,142,152,173,140 }; +static unsigned char hidp_mkeyspat[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }; + static struct hidp_session *__hidp_get_session(bdaddr_t *bdaddr) { struct hidp_session *session; @@ -174,6 +176,11 @@ case 0x01: /* Keyboard report */ for (i = 0; i < 8; i++) input_report_key(dev, hidp_keycode[i + 224], (udata[0] >> i) & 1); + + /* If all the key codes have been set to 0x01, it means + * too many keys were pressed at the same time. */ + if (!memcmp(udata + 2, hidp_mkeyspat, 6)) + break; for (i = 2; i < 8; i++) { if (keys[i] > 3 && memscan(udata + 2, keys[i], 6) == udata + 8) {