Surface Dial 现在可以在内核 4.19 的 Linux 中被识别。
evtest现在给出如下输出:
...
/dev/input/event6: Surface Dial System Multi Axis
/dev/input/event7: Surface Dial System Control
...
测试结果如下:
Select the device event number [0-7]: 6
Input driver version is 1.0.1
Input device ID: bus 0x5 vendor 0x45e product 0x91b version 0x108
Input device name: "Surface Dial System Multi Axis"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 256 (BTN_0)
Event type 2 (EV_REL)
Event code 7 (REL_DIAL)
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
向右旋转:
Event: time 1576958667.062349, -------------- SYN_REPORT ------------
Event: time 1576958667.100180, type 2 (EV_REL), code 7 (REL_DIAL), value 1
Event: time 1576958667.100180, -------------- SYN_REPORT ------------
向左旋转:
Eent: time 1576958712.249904, -------------- SYN_REPORT ------------
Event: time 1576958712.274887, type 2 (EV_REL), code 7 (REL_DIAL), value -1
Event: time 1576958712.274887, -------------- SYN_REPORT ------------
按钮按下和释放
Event: time 1576958828.106521, -------------- SYN_REPORT ------------
Event: time 1576958829.500202, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1576958829.500202, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 1576958829.500202, -------------- SYN_REPORT ------------
Event: time 1576958829.687451, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1576958829.687451, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 1576958829.687451, -------------- SYN_REPORT ------------
[31.536] (II) config/udev: Adding input device Surface Dial System Multi Axis (/dev/input/event6)
[31.536] (**) Surface Dial System Multi Axis: Applying InputClass "evdev pointer catchall"
[31.536] (**) Surface Dial System Multi Axis: Applying InputClass "libinput pointer catchall"
[31.537] (II) Using input driver 'libinput' for 'Surface Dial System Multi Axis'
[31.537] (**) Surface Dial System Multi Axis: always reports core events
[31.537] (**) Option "Device" "/dev/input/event6"
[31.537] (**) Option "_source" "server/udev"
[31.539] (II) event6 - Surface Dial System Multi Axis: is tagged by udev as: Mouse
[31.539] (II) event6 - Surface Dial System Multi Axis: device is a pointer
[31.540] (II) event6 - Surface Dial System Multi Axis: device removed
[31.575] (**) Option "config_info" "udev:/sys/devices/virtual/misc/uhid/0005:045E:091B.0002/input/input12/event6"
[31.575] (II) XINPUT: Adding extended input device "Surface Dial System Multi Axis" (type: MOUSE, id 12)
[31.577] (**) Option "AccelerationScheme" "none"
[31.579] (**) Surface Dial System Multi Axis: (accel) selected scheme none/0
[31.579] (**) Surface Dial System Multi Axis: (accel) acceleration factor: 2.000
[31.579] (**) Surface Dial System Multi Axis: (accel) acceleration threshold: 4
[31.582] (II) event6 - Surface Dial System Multi Axis: is tagged by udev as: Mouse
[31.583] (II) event6 - Surface Dial System Multi Axis: device is a pointer
[59.464] (II) config/udev: removing device Surface Dial System Multi Axis
有趣的话题!我知道这个设备没有内核支持,但这可能只是时间问题。然而,在其他软件中以及在某些情况下硬件中的实现是另一个问题。
这也可能是启动开源硬件项目以创建适用于任何操作系统的旋转编码器工具的机会。表盘和按钮,可通过标准化软件完全配置。
在内核 4.19 上添加了对 Surface Dial https://kernelnewbies.org/Linux_4.19的支持。
Surface Dial 现在可以在内核 4.19 的 Linux 中被识别。
evtest
现在给出如下输出:测试结果如下:
向右旋转:
向左旋转:
按钮按下和释放
这些事件如何在 WM KDE 中使用?我的目标是用它来滚动 text\webs。
我尝试使用 udev 规则将 Dial 分类为输入设备键盘,然后是鼠标。既没有帮助,也不会在 xev 中产生任何东西。
Xorg.0.log 正在显示类似的内容:
现在如何利用这些事件来让控件向上/向下滚动或放大/缩小等?不幸的是,我现在知道如何从这里拿走它。