AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1526449
Accepted
Pansmanser
Pansmanser
Asked: 2024-09-11 23:38:18 +0800 CST2024-09-11 23:38:18 +0800 CST 2024-09-11 23:38:18 +0800 CST

如何在 Ubuntu 中重新映射 Windows 副驾驶键?

  • 772

在此处输入图片描述我有一台戴尔笔记本电脑(inspiron 16 5645)。除了 Super 键之外,它还有另一个键,据说是 Windows 副驾驶键。它似乎表现得像左移键,xev 将其报告为相同的键码,但大概 Windows 可以区分它。

我可以用它做点有用的事情吗?我想将它映射到右 ctrl,但它不存在。

编辑:添加终端输出:-外窗口为 0x800001,内窗口为 0x800002

PropertyNotify event, serial 8, synthetic NO, window 0x800001,
    atom 0x27 (WM_NAME), time 74036986, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x800001,
    atom 0x22 (WM_COMMAND), time 74036986, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x800001,
    atom 0x28 (WM_NORMAL_HINTS), time 74036986, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x800001,
    parent 0x800001, window 0x800002, (10,10), width 50, height 50
border_width 4, override NO
PropertyNotify event, serial 14, synthetic NO, window 0x800001,
    atom 0xf9 (WM_PROTOCOLS), time 74036986, state PropertyNewValue
MapNotify event, serial 15, synthetic NO, window 0x800001,
    event 0x800001, window 0x800002, override NO
ConfigureNotify event, serial 21, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, (0,0), width 178, height 178,
    border_width 0, above 0x600109, override NO
PropertyNotify event, serial 28, synthetic NO, window 0x800001,
    atom 0x16f (_NET_WM_ALLOWED_ACTIONS), time 74036986, state PropertyNewValue
PropertyNotify event, serial 29, synthetic NO, window 0x800001,
    atom 0x153 (_MUTTER_NEEDS_FRAME), time 74036986, state PropertyNewValue
PropertyNotify event, serial 29, synthetic NO, window 0x800001,
    atom 0x101 (_NET_WM_DESKTOP), time 74036986, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x800001,
    atom 0x13b (WM_STATE), time 74036987, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74036987, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x800001,
    atom 0x131 (_GTK_EDGE_CONSTRAINTS), time 74036987, state PropertyNewValue
ConfigureNotify event, serial 34, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, (50,32), width 178, height 178,
    border_width 0, above 0x600109, override NO
PropertyNotify event, serial 34, synthetic NO, window 0x800001,
    atom 0x131 (_GTK_EDGE_CONSTRAINTS), time 74036988, state PropertyNewValue
ReparentNotify event, serial 34, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, parent 0xa001a0,
    (0,0), override NO
PropertyNotify event, serial 34, synthetic NO, window 0x800001,
    atom 0xfe (_NET_FRAME_EXTENTS), time 74037001, state PropertyNewValue
ConfigureNotify event, serial 34, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, (14,49), width 178, height 178,
    border_width 0, above 0xa001a1, override NO
MapNotify event, serial 35, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, override NO
VisibilityNotify event, serial 35, synthetic NO, window 0x800001,
    state VisibilityUnobscured
Expose event, serial 35, synthetic NO, window 0x800001,
    (0,0), width 178, height 10, count 3
Expose event, serial 35, synthetic NO, window 0x800001,
    (0,10), width 10, height 58, count 2
Expose event, serial 35, synthetic NO, window 0x800001,
    (68,10), width 110, height 58, count 1
Expose event, serial 35, synthetic NO, window 0x800001,
    (0,68), width 178, height 110, count 0
ConfigureNotify event, serial 35, synthetic YES, window 0x800001,
    event 0x800001, window 0x800001, (198,217), width 178, height 178,
    border_width 2, above 0x0, override NO
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037002, state PropertyNewValue
FocusIn event, serial 35, synthetic NO, window 0x800001,
    mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037005, state PropertyNewValue
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037005, state PropertyNewValue
EnterNotify event, serial 35, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74037005, (155,114), root:(355,333),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus YES, state 0
KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037016, state PropertyNewValue
KeyRelease event, serial 35, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74037112, (155,114), root:(355,333),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    XLookupString gives 1 bytes: (0d) "
"
    XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74043466, (155,114), root:(355,333),
    state 0x40, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74043594, (155,114), root:(355,333),
    state 0x41, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
LeaveNotify event, serial 38, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74047709, (-12,-47), root:(188,172),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0
ClientMessage event, serial 38, synthetic YES, window 0x800001,
    message_type 0xf9 (WM_PROTOCOLS), format 32, message 0xf7 (WM_DELETE_WINDOW)
keyboard
  • 2 2 个回答
  • 300 Views

2 个回答

  • Voted
  1. TheBlackKoala
    2024-09-27T22:09:30+08:002024-09-27T22:09:30+08:00

    所以我遇到了类似的问题,只是我是 Arch 用户,并且有一台带副驾驶键的联想电脑。对我有用的是以下脚本(安装 evsieve 后):

    sudo setkeycodes 6e 193 #Catch unknown keycode and make it into left-meta
    sudo /usr/bin/evsieve\
         --input "/dev/input/by-path/platform-i8042-serio-0-event-kbd" grab=auto persist=exit\ #Setup keyboard
         --hook key:leftmeta key:leftshift key:f23 sequential period=0.032 send-key=key:leftctrl\ #Capture left-meta, left-shift and f23 (the copilot button as it is now) and produce a leftctrl
         --withhold key:leftmeta key:leftshift key:f23\ #Don't send copilot button
         --output create-link="/dev/input/by-path/platform-i8042-serio-0-event-kbd-evsieve" #More keyboard things - i think
    

    原文(我在 bash 中运行注释失败):

    sudo setkeycodes 6e 193
    sudo /usr/bin/evsieve\
         --input "/dev/input/by-path/platform-i8042-serio-0-event-kbd" grab=auto persist=exit\
         --hook key:leftmeta key:leftshift key:f23 sequential period=0.032 send-key=key:leftctrl\
         --withhold key:leftmeta key:leftshift key:f23\
         --output create-link="/dev/input/by-path/platform-i8042-serio-0-event-kbd-evsieve" #More keyboard things - i think
    
    • 1
  2. Best Answer
    chase chen
    2024-10-01T19:38:30+08:002024-10-01T19:38:30+08:00
    1. 在 ubuntu 中,windows copilot 键相当于 leftshift+leftmeta。你可以用 evsieve 来测试它。

    2. 您可以通过keyd重新映射副驾驶键。将底部内容添加到keyd的配置文件中。

    rvaiya/keyd:Linux 的键重映射守护进程。

    leftshift+leftmeta = overload(control, esc)
    
    • 1

相关问题

  • 有哪些有用的键盘快捷键?[关闭]

  • 如何在 Compiz->Commands 中获得超过 12 个命令?[关闭]

  • 输入语言切换键只接受 shift-alt 而不是 alt-shift [关闭]

  • 如何在键盘上映射未映射的键?[关闭]

  • 如何重置我的键盘布局?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve