X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Finput_id%2Finput_id.c;h=588ff8992aa6a5522b3067460358d02f8e215be8;hb=792479aca54d266430c900f90557ea8d0da2c125;hp=b2d4a6770af5be860de1ce0f1c5b87a97a08e1ce;hpb=88149f668ea7ac23c61f6d1982db4f4517da763c;p=elogind.git diff --git a/extras/input_id/input_id.c b/extras/input_id/input_id.c index b2d4a6770..588ff8992 100644 --- a/extras/input_id/input_id.c +++ b/extras/input_id/input_id.c @@ -148,6 +148,17 @@ static void test_key (const unsigned long* bitmask_ev, found |= bitmask_key[i]; DBG("test_key: checking bit block %lu for any keys; found=%i\n", i*BITS_PER_LONG, found > 0); } + /* If there are no keys in the lower block, check the higher block */ + if (!found) { + for (i = KEY_OK; i < BTN_TRIGGER_HAPPY; ++i) { + if (test_bit (i, bitmask_key)) { + DBG("test_key: Found key %x in high block\n", i); + found = 1; + break; + } + } + } + if (found > 0) puts("ID_INPUT_KEY=1");