uname -a

uname -a

我正在尝试识别笔记本电脑键盘。这样我就可以禁用它。它导致了问题(参见永久禁用键盘),所以我想禁用它。然而我无法识别它。如何识别键盘?


  • 硬件:lenovo Yoga 3 笔记本电脑(intel gfx 版本),带有外部键盘和鼠标(因此我可以禁用内部)。
  • 操作系统:Debian Gnu/Linux Jessie(即将升级到 Debian 当前版本)。

各种其他数据

uname -a

Linux my-laptop 4.9.0-0.bpo.6-amd64 #1 SMP Debian 4.9.88-1+deb9u1~bpo8+1 (2018-05-13) x86_64 GNU/Linux

lsusb

Bus 001 Device 002: ID 8087:8001 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 0bc2:ab24 Seagate RSS LLC
Bus 003 Device 002: ID 2109:8110
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 011: ID 8087:07dc Intel Corp.
Bus 002 Device 009: ID 1bcf:2c43 Sunplus Innovation Technology Inc.
Bus 002 Device 007: ID 04f3:2052 Elan Microelectronics Corp.
Bus 002 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 002 Device 003: ID 2109:2811
Bus 002 Device 073: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 072: ID 046d:c31d Logitech, Inc. Media Keyboard K200
Bus 002 Device 071: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 002 Device 070: ID 0424:2228 Standard Microsystems Corp. 9-in-2 Card Reader
Bus 002 Device 069: ID 0424:2602 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 068: ID 0424:2502 Standard Microsystems Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb --tree

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/11p, 480M
    |__ Port 1: Dev 68, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 69, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 70, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            |__ Port 2: Dev 71, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 72, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
                |__ Port 1: Dev 72, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
                |__ Port 2: Dev 73, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 4: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
    |__ Port 5: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 9, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 6: Dev 9, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 11, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 7: Dev 11, If 0, Class=Wireless, Driver=btusb, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M

lsusb -s 2:7

Bus 002 Device 007: ID 04f3:2052 Elan Microelectronics Corp.

usb-devices


T:  Bus=02 Lev=01 Prnt=01 Port=04 Cnt=04 Dev#=  7 Spd=12  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04f3 ProdID=2052 Rev=10.13
S:  Manufacturer=ELAN
S:  Product=Touchscreen
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

sudo lsinput

/dev/input/event0
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43841
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event1
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x5
   version : 0
   name    : "Lid Switch"
   phys    : "PNP0C0D/button/input0"
   bits ev : EV_SYN EV_SW

/dev/input/event2
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "PNP0C0C/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event3
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "LNXPWRBN/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event4
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "Ideapad extra buttons"
   phys    : "ideapad/input0"
   bits ev : EV_SYN EV_KEY EV_MSC

/dev/input/event5
   bustype : BUS_ISA
   vendor  : 0x1f
   product : 0x1
   version : 256
   name    : "PC Speaker"
   phys    : "isa0061/input0"
   bits ev : EV_SYN EV_SND

/dev/input/event6
   bustype : BUS_I2C
   vendor  : 0x4f3
   product : 0x4e
   version : 0
   name    : "Elan Touchpad"
   bits ev : EV_SYN EV_KEY EV_ABS

/dev/input/event7
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x6
   version : 0
   name    : "Video Bus"
   phys    : "LNXVIDEO/video/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event8
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel HDMI HDMI/DP,pcm=3"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event9
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel HDMI HDMI/DP,pcm=7"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event10
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel HDMI HDMI/DP,pcm=8"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event11
   bustype : BUS_PCI
   vendor  : 0x10ec
   product : 0x235
   version : 1
   name    : "HDA Digital PCBeep"
   phys    : "card1/codec#0/beep0"
   bits ev : EV_SYN EV_SND

/dev/input/event12
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel PCH Mic"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event13
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel PCH Front Headphone"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event14
   bustype : BUS_USB
   vendor  : 0x1bcf
   product : 0x2c43
   version : 261
   name    : "Lenovo EasyCamera"
   phys    : "usb-0000:00:14.0-6/button"
   bits ev : EV_SYN EV_KEY

/dev/input/event15
   bustype : BUS_USB
   vendor  : 0x4f3
   product : 0x2052
   version : 272
   name    : "ELAN Touchscreen"
   phys    : "usb-0000:00:14.0-5/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_ABS

/dev/input/event16
   bustype : BUS_USB
   vendor  : 0x46d
   product : 0xc31d
   version : 272
   name    : "Logitech USB Keyboard"
   phys    : "usb-0000:00:14.0-1.1.2.1/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event17
   bustype : BUS_USB
   vendor  : 0x46d
   product : 0xc31d
   version : 272
   name    : "Logitech USB Keyboard"
   phys    : "usb-0000:00:14.0-1.1.2.1/input1"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_ABS EV_MSC

/dev/input/event18
   bustype : BUS_USB
   vendor  : 0x93a
   product : 0x2510
   version : 273
   name    : "PixArt USB Optical Mouse"
   phys    : "usb-0000:00:14.0-1.1.2.2/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_MSC

xinput --list

此时键盘被禁用,作为xinput。然而,它正在重新启用。

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Elan Touchpad                             id=15   [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=12   [slave  pointer  (2)]
⎜   ↳ PixArt USB Optical Mouse                  id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=14   [slave  keyboard (3)]
    ↳ Lenovo EasyCamera                         id=13   [slave  keyboard (3)]
    ↳ Logitech USB Keyboard                     id=9    [slave  keyboard (3)]
    ↳ Logitech USB Keyboard                     id=10   [slave  keyboard (3)]
∼ AT Translated Set 2 keyboard                  id=16   [floating slave]

禁用为xinput

KeyboardToRemove="AT Translated Set 2 keyboard"

xinput list |
    grep "$KeyboardToRemove" |
    sed -r -e 's/.*id=([0-9]+).*/\1/' |
    xargs xinput float

相关内容