首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更改给定设备的密钥代码

更改给定设备的密钥代码
EN

Unix & Linux用户
提问于 2019-09-17 17:43:20
回答 1查看 194关注 0票数 1

我刚得到了一个罗技聚光灯演示器,它有两个按钮,它们的密钥代码与我的演示(revealjs)不兼容。NextPrevious绑定为RightLeft,而我想将它们更改为np。我正在使用Ubuntu18.04和ArchLinux。

设备的参数:

代码语言:javascript
复制
$ lsusb -d 046d:c53e -v

Bus 001 Device 012: ID 046d:c53e Logitech, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        32
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc53e
  bcdDevice           41.00
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          4
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      59
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     148
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      98
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               2

以下是当前显示的键:

代码语言:javascript
复制
# showkeys --scancodes
0xe0 0x4d 0xe0 0xcd
0xe0 0x4b 0xe0 0xcb

# showkeys --keycodes
keycode 106 release
keycode 105 release

这是根据我的键盘显示的键:

代码语言:javascript
复制
# showkeys --scancodes
0x31 0xb1
p0x19 0x99

# showkeys --keycodes
keycode  49 release
keycode  25 release

我推断出以下/lib/udev/hwdb.d/61-logitech-spotlight-presenter-revealjs.hwdb

代码语言:javascript
复制
# This file has been created to improve Logitech Spotlight Presenter in revealjs
evdev:input:b*v046dpc53e*
 KEYBOARD_KEY_69=p
 KEYBOARD_KEY_6a=n

然后,我尝试了以下几点

代码语言:javascript
复制
$ sudo systemd-hwdb update
$ udevadm trigger
$ sudo udevadm control --reload-rules && udevadm trigger

但是我的遥控器仍然可以发射Right/Left

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-03-01 17:13:10

开源软件投影仪允许你映射罗技聚光灯的按钮(并且有一个可定制的桌面点)

项目主页:https://github.com/jahnf/Projecteur

用于arch的包也可获得:https://aur.archlinux.org/packages/projecteur

对于Ubuntu,包可以在项目的github页面以及Ubuntu存储库20.10及更高版本中获得。

免责声明:我是“投影仪”的作者。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/542299

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档