0

I have a Logitech R400 presenter which has four buttons: Left, Right, Present and Screen. It's connected to USB. Left/Right work out of the box and map to Page-Up/Page-Down. Present and Screen seem entirely dead out of the box. I want to make the latter two work as well.

Here's an xev example of the key that works:

KeyPress event, serial 38, synthetic NO, window 0x6200001,
    root 0x6c1, subw 0x0, time 308338317, (149,168), root:(154,330),
    state 0x10, keycode 117 (keysym 0xff56, Next), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

The two "dead" keys produce no xev events whatsoever. However, they do send scancodes:

# evtest
Event: time 1625754445.915648, -------------- SYN_REPORT ------------
Event: time 1625754446.211650, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004e
Event: time 1625754446.211650, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1
Event: time 1625754446.211650, -------------- SYN_REPORT ------------
^[[6~Event: time 1625754446.339648, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004e
Event: time 1625754446.339648, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 0
Event: time 1625754446.339648, -------------- SYN_REPORT ------------
Event: time 1625754450.523662, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70029
Event: time 1625754450.523662, type 1 (EV_KEY), code 425 (KEY_PRESENTATION), value 1
Event: time 1625754450.523662, -------------- SYN_REPORT ------------
Event: time 1625754450.667660, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70029
Event: time 1625754450.667660, type 1 (EV_KEY), code 425 (KEY_PRESENTATION), value 0
Event: time 1625754450.667660, -------------- SYN_REPORT ------------
Event: time 1625754451.027658, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70037
Event: time 1625754451.027658, type 1 (EV_KEY), code 431 (KEY_DISPLAYTOGGLE), value 1
Event: time 1625754451.027658, -------------- SYN_REPORT ------------
Event: time 1625754451.195657, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70037
Event: time 1625754451.195657, type 1 (EV_KEY), code 431 (KEY_DISPLAYTOGGLE), value 0
Event: time 1625754451.195657, -------------- SYN_REPORT ------------

Here, I first pressed "right", then "presentation", then "display toggle". All three button presses show up perfectly.

Here's the xinput configuration for the pointer device:

$ xinput list-props 12
Device 'Logitech USB Receiver Keyboard':
    Device Enabled (163):   1
    Coordinate Transformation Matrix (165): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Send Events Modes Available (286): 1, 0
    libinput Send Events Mode Enabled (287):    0, 0
    libinput Send Events Mode Enabled Default (288):    0, 0
    Device Node (289):  "/dev/input/event3"
    Device Product ID (290):    1133, 50477

I've attempted to set "libinput Send Events Mode Enabled" to "1, 0" but that just breaks all buttons (then none work anymore).

Here's my xkbmap configuration:

$ setxkbmap -print -query
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwertz)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+de+inet(evdev)" };
    xkb_geometry  { include "pc(pc105)" };
};
rules:      evdev
model:      pc105
layout:     de

How can I make the two additional buttons generate X events so I can map them to actions or remap them to different keys?

Note that this issue is fairly ancient, I've found posts as early as 2018 describing that exact issue, but no solution so far (e.g., https://bbs.archlinux.org/viewtopic.php?id=218693).

0 Answers0