awesome-wm - AwesomeWm 我需要有关映射更多修饰键的建议
问题描述
我需要为键映射找到另外几个修饰符。Awesome Docs 声明有效的修饰符是 Any、Mod1、Mod2、Mod3、Mod4、Mod5、Shift、Lock 和 Control,其中一些我不清楚,但我尝试过 Capslock 和 Tab,但效果不佳。虽然绑定似乎有效,但我发现您仍然可以通过仅使用“键”部分来触发该功能,就好像修饰符被忽略一样。我知道我很可能不得不绘制这些地图,我希望我能得到一些关于从哪里开始的建议,提前感谢您的帮助
我在 Manjaro/Arch 上使用了很棒的 4.3 谢谢
clear mod4
add mod4 = Super_L Hyper_L
add mod3 = Super_R Menu
keycode 135 = Super_R Menu
和 cli xmodmap 的输出
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3 Super_R (0x86), Super_R (0x87)
mod4 Super_L (0x85), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
解决方案
You can see current modifiers with xmodmap
in a terminal.
You can add Tab key to mod1 with:
$ xmodmap -e "add mod1 = Tab"
Then you can use Mod1 in rc.lua
, for example:
root.buttons = gears.table.join(
...
...
awful.button({"Mod1"}, 1, function() naughty.notification({text="ok"}) end),
...
...
)
With holding Tab and pressing left mouse button, you pop up the notification.
Nevertheless, Tab will continue to tabulate... but if you want to change this behaviour, you may need to consider a xmodmap tutorial like this one.
In awesomeWM, you can find a table with your current modifiers. Below we can see that Tab has been added to the Mod1 table:
$ awesome-client "return awesome._modifiers.Mod1[1].keysym"
string "Tab"
$ awesome-client "return awesome._modifiers.Mod1[1].keycode"
double 23
Edit
With xmodmap
to reassign Menu
key to mod3:
clear mod1
add mod1 = Alt_L Meta_L
add Mod3 = Menu
推荐阅读
- vue.js - RouterLink 在 Vue Js 中未正确显示
- rxjs - 用大理石图测试去抖动
- angularjs - 在 angular.js 中包含带有 $provide.factory 的工厂函数后无法调用工厂方法
- javascript - 将参数传递给 Function Express JS
- javascript - 来自嵌套函数的Vuejs访问函数
- javascript - sequilize:如何获取创建时间超过 1 小时的记录
- javascript - 承诺不会将所有数据提取到前端
- php - 将数组转换为对象的更好方法
- algorithm - 选择序列中的元素
- bash - 在后台运行 mplayer 命令将 &1 替换为 1