我的鍵盤辨識為滑鼠
我的 Logitech Wave 無繩鍵盤在核心中顯示為兩個設備。一個是可以正常工作的正常鍵盤,但所有附加鍵都顯示為事件滑鼠,這樣
cat /dev/input/by-id/usb-Logitech_USB_Receiver-if01-event-mouse
按下按鈕時會產生預期的垃圾,但 xev 根本沒有註冊任何東西。我已經嘗試過不想在 OpenSuse Tumbleweed 上執行的 hidpoint,並且我已經嘗試過
usbhid.quirks=0x46d:0xc517:0x40
使用核心參數來強制進行“多身份”辨識,但此時我已經超出了我的深度,所以可能不太正確明白我在做什麼關於如何最好地說服核心將額外設備辨識為鍵盤而不是滑鼠的任何建議?
根據要求提供更多資訊:
lsusb:
Bus 001 Device 007: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
dmsg:
usb 1-6: new low-speed USB device number 7 using xhci_hcd usb 1-6: New USB device found, idVendor=046d, idProduct=c517 usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-6: Product: USB Receiver usb 1-6: Manufacturer: Logitech input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:046D:C517.0009/input/input14 logitech 0003:046D:C517.0009: input,hidraw3: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-6/input0 logitech 0003:046D:C517.000A: fixing up Logitech keyboard report descriptor input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:046D:C517.000A/input/input15 logitech 0003:046D:C517.000A: input,hiddev0,hidraw4: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-6/input1
$ evtest /dev/input/by-id/usb-Logitech_USB_Receiver-if01-event-mouse > evtestdump Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x46d product 0xc517 version 0x110 Input device name: "Logitech USB Receiver" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 1 (KEY_ESC) Event code 28 (KEY_ENTER) Event code 74 (KEY_KPMINUS) Event code 78 (KEY_KPPLUS) Event code 103 (KEY_UP) ... Event code 241 (KEY_VIDEO_NEXT) Event code 244 (KEY_BRIGHTNESS_ZERO) Event code 256 (BTN_0) Event code 272 (BTN_LEFT) Event code 273 (BTN_RIGHT) Event code 274 (BTN_MIDDLE) Event code 275 (BTN_SIDE) Event code 276 (BTN_EXTRA) Event code 277 (BTN_FORWARD) Event code 278 (BTN_BACK) Event code 279 (BTN_TASK) Event code 352 (KEY_OK) Event code 353 (KEY_SELECT) Event code 354 (KEY_GOTO) Event code 358 (KEY_INFO) Event code 362 (KEY_PROGRAM) Event code 366 (KEY_PVR) Event code 370 (KEY_SUBTITLE) Event code 371 (KEY_ANGLE) Event code 372 (KEY_ZOOM) Event code 374 (KEY_KEYBOARD) Event code 376 (KEY_PC) Event code 377 (KEY_TV) Event code 378 (KEY_TV2) ... Event code 431 (KEY_DISPLAYTOGGLE) Event code 432 (KEY_SPELLCHECK) Event code 433 (KEY_LOGOFF) Event code 439 (KEY_MEDIA_REPEAT) Event code 442 (KEY_IMAGES) Event code 478 (KEY_FN_1) Event code 479 (KEY_FN_2) Event code 576 (KEY_BUTTONCONFIG) Event code 577 (KEY_TASKMANAGER) Event code 578 (KEY_JOURNAL) Event code 579 (KEY_CONTROLPANEL) Event code 580 (KEY_APPSELECT) Event code 581 (KEY_SCREENSAVER) Event code 582 (KEY_VOICECOMMAND) Event code 592 (KEY_BRIGHTNESS_MIN) Event code 593 (KEY_BRIGHTNESS_MAX) Event code 608 (KEY_KBDINPUTASSIST_PREV) Event code 609 (KEY_KBDINPUTASSIST_NEXT) Event code 610 (KEY_KBDINPUTASSIST_PREVGROUP) Event code 611 (KEY_KBDINPUTASSIST_NEXTGROUP) Event code 612 (KEY_KBDINPUTASSIST_ACCEPT) Event code 613 (KEY_KBDINPUTASSIST_CANCEL) Event type 2 (EV_REL) Event code 0 (REL_X) Event code 1 (REL_Y) Event code 6 (REL_HWHEEL) Event code 7 (REL_DIAL) Event code 8 (REL_WHEEL) Event type 3 (EV_ABS) Event code 32 (ABS_VOLUME) Value 0 Min 1 Max 4173 Event type 4 (EV_MSC) Event code 4 (MSC_SCAN) Properties: Testing ... (interrupt to exit) Event: time 1498324926.500910, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101c Event: time 1498324926.500910, type 1 (EV_KEY), code 154 (KEY_CYCLEWINDOWS), value 1 Event: time 1498324926.500910, -------------- SYN_REPORT ------------ Event: time 1498324926.644944, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101c Event: time 1498324926.644944, type 1 (EV_KEY), code 154 (KEY_CYCLEWINDOWS), value 0 Event: time 1498324926.644944, -------------- SYN_REPORT ------------ Event: time 1498324926.932933, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101f Event: time 1498324926.932933, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 1 Event: time 1498324926.932933, -------------- SYN_REPORT ------------ Event: time 1498324927.052921, type 4 (EV_MSC), code 4 (MSC_SCAN), value c101f Event: time 1498324927.052921, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 0 Event: time 1498324927.052921, -------------- SYN_REPORT ------------ Event: time 1498324927.396932, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1020 Event: time 1498324927.396932, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 1 Event: time 1498324927.396932, -------------- SYN_REPORT ------------ Event: time 1498324927.548930, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1020 Event: time 1498324927.548930, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 0 Event: time 1498324927.548930, -------------- SYN_REPORT ------------ Event: time 1498324927.916944, type 4 (EV_MSC), code 4 (MSC_SCAN), value c103d Event: time 1498324927.916944, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1 Event: time 1498324927.916944, -------------- SYN_REPORT ------------ Event: time 1498324928.084925, type 4 (EV_MSC), code 4 (MSC_SCAN), value c103d Event: time 1498324928.084925, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 0 Event: time 1498324928.084925, -------------- SYN_REPORT ------------ Event: time 1498324928.460914, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1005 Event: time 1498324928.460914, type 1 (EV_KEY), code 212 (KEY_CAMERA), value 1 Event: time 1498324928.460914, -------------- SYN_REPORT ------------ Event: time 1498324928.628903, type 4 (EV_MSC), code 4 (MSC_SCAN), value c1005 Event: time 1498324928.628903, type 1 (EV_KEY), code 212 (KEY_CAMERA), value 0 Event: time 1498324928.628903, -------------- SYN_REPORT ------------ Event: time 1498324930.876924, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b6 Event: time 1498324930.876924, type 1 (EV_KEY), code 165 (KEY_PREVIOUSSONG), value 1 Event: time 1498324930.876924, -------------- SYN_REPORT ------------ Event: time 1498324930.908915, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b6 Event: time 1498324930.908915, type 1 (EV_KEY), code 165 (KEY_PREVIOUSSONG), value 0 Event: time 1498324930.908915, -------------- SYN_REPORT ------------ Event: time 1498324931.684927, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b5 Event: time 1498324931.684927, type 1 (EV_KEY), code 163 (KEY_NEXTSONG), value 1 Event: time 1498324931.684927, -------------- SYN_REPORT ------------ Event: time 1498324931.724935, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00b5 Event: time 1498324931.724935, type 1 (EV_KEY), code 163 (KEY_NEXTSONG), value 0 Event: time 1498324931.724935, -------------- SYN_REPORT ------------ Event: time 1498324932.652916, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183 Event: time 1498324932.652916, type 1 (EV_KEY), code 226 (KEY_MEDIA), value 1 Event: time 1498324932.652916, -------------- SYN_REPORT ------------ Event: time 1498324932.812954, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0183 Event: time 1498324932.812954, type 1 (EV_KEY), code 226 (KEY_MEDIA), value 0 Event: time 1498324932.812954, -------------- SYN_REPORT ------------ Event: time 1498324933.748907, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0192 Event: time 1498324933.748907, type 1 (EV_KEY), code 140 (KEY_CALC), value 1 Event: time 1498324933.748907, -------------- SYN_REPORT ------------ Event: time 1498324933.884934, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0192 Event: time 1498324933.884934, type 1 (EV_KEY), code 140 (KEY_CALC), value 0 Event: time 1498324933.884934, -------------- SYN_REPORT ------------ Event: time 1498324938.084936, type 4 (EV_MSC), code 4 (MSC_SCAN), value 10082 Event: time 1498324938.084936, type 1 (EV_KEY), code 142 (KEY_SLEEP), value 1 Event: time 1498324938.084936, -------------- SYN_REPORT ------------ Event: time 1498324938.100912, type 4 (EV_MSC), code 4 (MSC_SCAN), value 10082 Event: time 1498324938.100912, type 1 (EV_KEY), code 142 (KEY_SLEEP), value 0 Event: time 1498324938.100912, -------------- SYN_REPORT ------------ (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/mouse1) (**) Logitech USB Receiver: Applying InputClass "system-keyboard" (**) Logitech USB Receiver: Applying InputClass "Logitech USB TrackBall" (**) Logitech USB Receiver: Applying InputClass "Logitech M570 Trackball" (II) Using input driver 'evdev' for 'Logitech USB Receiver' (**) Option "SendCoreEvents" "true" (**) Logitech USB Receiver: always reports core events (**) evdev: Logitech USB Receiver: Device: "/dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse" (WW) evdev: Logitech USB Receiver: device file is duplicate. Ignoring. (EE) PreInit returned 8 for "Logitech USB Receiver" (II) UnloadModule: "evdev" (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event11) (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall" (**) Logitech USB Receiver: Applying InputClass "system-keyboard" (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall" (**) Logitech USB Receiver: Applying InputClass "libinput keyboard catchall" (II) Using input driver 'libinput' for 'Logitech USB Receiver' (**) Logitech USB Receiver: always reports core events (**) Option "Device" "/dev/input/event11" (**) Option "_source" "server/udev" (II) event11 - (II) Logitech USB Receiver: (II) is tagged by udev as: Keyboard (II) event11 - (II) Logitech USB Receiver: (II) device is a keyboard (II) event11 - (II) Logitech USB Receiver: (II) device removed (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:046D:C517.000D/input/input18/event11" (II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: KEYBOARD, id 11) (**) Option "xkb_model" "microsoftpro" (**) Option "xkb_layout" "gb" (**) Option "xkb_options" "terminate:ctrl_alt_bksp" (II) event11 - (II) Logitech USB Receiver: (II) is tagged by udev as: Keyboard (II) event11 - (II) Logitech USB Receiver: (II) device is a keyboard (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event12) (**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall" (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall" (**) Logitech USB Receiver: Applying InputClass "system-keyboard" (**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall" (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall" (**) Logitech USB Receiver: Applying InputClass "Logitech USB TrackBall" (**) Logitech USB Receiver: Applying InputClass "Logitech M570 Trackball" (**) Logitech USB Receiver: Applying InputClass "libinput pointer catchall" (**) Logitech USB Receiver: Applying InputClass "libinput keyboard catchall" (II) Using input driver 'libinput' for 'Logitech USB Receiver' (**) Option "SendCoreEvents" "true" (**) Logitech USB Receiver: always reports core events (**) Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse" (**) Option "_source" "server/udev" (EE) Failed to look up path '/dev/input/event13' (II) event13: opening input device '/dev/input/event13' failed (No such device). (II) event13 - failed to create input device '/dev/input/event13'. (EE) libinput: Logitech USB Receiver: Failed to create a device for /dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse (EE) PreInit returned 2 for "Logitech USB Receiver" (II) UnloadModule: "libinput"
我也有一個 M570 軌跡球,接收器顯然正在連接,儘管它已經通過通用接收器連接。
部分答案:如何獲取更多資訊
- 使用 out 更新問題,
lsusb
以便我們可以看到供應商和設備 ID。
dmesg
2)當組合被辨識時,用輸出更新問題。如果您在啟動消息中找不到它,請拔下並重新插入加密狗以強制重新辨識。3)
evtest
在滑鼠輸入設備上以 root 身份執行以查看 (a) 它聲稱會產生哪些事件 (b) 當您按下附加鍵時它會產生哪些實際事件。使用該輸出更新問題。4)查看它辨識
/var/log/Xorg.0.log
的驅動程序是什麼設備。evdev
用相關行更新問題。這至少應該可以查明設備被辨識為滑鼠的原因。
編輯
我不明白 Logitech 驅動程序應該如何工作,但發生的情況是第二個設備似乎確實是為額外的鍵和滑鼠 (
EV_REL
) 事件保留的,所以也許它是某種包羅萬象的東西。從沒有區別的核心方面來看,核心所知道的只是它將 USB HID 事件轉換為輸入事件。並且
udev
符號連結是否帶有誤導性名稱,但這也沒關係。重要的是 X 似乎決定第二個輸入設備是重複的(可能是因為它具有相同的名稱)。所以我會嘗試在xorg.conf
其中製作一個InputClass
部分,並嘗試各種選項,希望讓 X 接受該設備。我不知道為什麼X 拒絕它,所以我不能給出一步一步的指示。如果描述不充分,請參閱man xorg.conf
有關選項InputClass
,並Google一下以了解他們會做什麼,有很多指南。除了查看 X 日誌外,還可以查看哪些設備
xinput
列表。讓它顯示在這個列表中就足夠了,即使它顯示為滑鼠 - 你可以將它重新分配給Virtual core keyboard
. 它可能會被檢測為滑鼠,因為 X 認為(在大多數情況下可能是正確的)帶有EV_REL
事件的東西必須是滑鼠,即使它有額外的EV_KEY
按鈕。