• 请不要在回答技术问题时复制粘贴 AI 生成的内容
hujianxin
V2EX  ›  程序员

Linux 下面可以将 Caps 单独按下、与其他 key 一起按下,绑定到不同用途吗?

  •  
  •   hujianxin · Mar 8, 2020 · 2055 views
    This topic created in 2261 days ago, the information mentioned may be changed or developed.

    目前的需求是这样的:

    1. 当单独按下 Caps 时,它是 Control+\
    2. 当与其他键一起按下时,他是 Control

    目前了解了下 xcape,貌似可以实现这个功能,不过还没有机会实验。

    各位 Linux 大佬有解决这个问题的办法吗?

    aaniao002
        1
    aaniao002  
       Mar 8, 2020 via Android
    xbingkeys 配合 xdotool,好像这么拼写。试试看。
    hujianxin
        2
    hujianxin  
    OP
       Mar 9, 2020
    @aaniao002 多谢,这个我没有成功,但是确实通过 xcape 实现了功能

    ```
    setxkbmap -option 'caps:ctrl_modifier'
    xcape -e 'Caps_Lock=Control_L|backslash'
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3030 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:02 · PVG 20:02 · LAX 05:02 · JFK 08:02
    ♥ Do have faith in what you're doing.