Openbox自定义键盘(lxde-rc)

Openbox介绍

Openbox 是运行于搭载X11的GNU/Linux上的轻巧窗口管理器,Openbox 以GPL协议方式开放源代码,是免费自由软件。Openbox基于Blackbox,后者被认为原始窗口管理器之一(即代码自有)。

Key-Binding(按键绑定)

可以通过在rc.xml(具体为止通常在.config/openbox/xxx-rc.xml中,需根据各自系统而定)

Key-combination 组合按键

组合按键规则:Modifiers-Modifiers-Key

 

Modifiers(修饰符关键字)-缩写

Modifier keys含义
SShift key
CControl key
AAlt key
WSuper key (Usually bound to the Windows key on keyboards which have one) (WINDOWS电脑中的系统键)
MMeta key
HHyper key (If it is bound to something)

Keys(按键关键字)

The Key is the name of the key, such as "a", "space", "Escape", "less", or "F1". You can find the name of any key by using the xev command in a terminal, pressing the desired key, and watching the output from xev in the terminal. For example, the following xev output indicates, on the third line, that the Menu key was pressed.

可以通过xev软件获得键盘按键的字符数字值,然后在组合中使用,譬如按键d:

KeyRelease event, serial 48, synthetic NO, window 0x1800001,
    root 0x17b, subw 0x0, time 3861563, (74,127), root:(75,155),
    state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
    XLookupString gives 1 bytes: (64) "d"
    XFilterEvent returns: False

可以使用字母:

<keyboard>
  ...
  <keybind key="d">
    <action name="ShowMenu">
      <menu>root-menu</menu>
    </action>
  </keybind>
  ...
</keyboard>

也可以使用数字值:

<keyboard>
  ...
  <keybind key="40">
    <action name="ShowMenu">
      <menu>root-menu</menu>
    </action>
  </keybind>
  ...
</keyboard>

Actions(动作)

可在http://openbox.org/wiki/Help:Actions 文档中查询所有动作功能。

譬如常见配置:

<keybind key="A-Tab">
	<action name="NextWindow" />
</keybind>
<keybind key="W-D">
	<action name="ToggleShowDesktop" />
</keybind>

A-Tabl(Alt+Tab)切换窗口显示;

W-D(Windows+D)切换桌面显示(显示桌面/隐藏桌面)

还可以通过Execute执行一些系统脚本或软件:

<keybind key="W-t">
  <action name="Execute">
    <command>urxvt</command>
  </action>
</keybind>

本文仅作简单介绍,详细配置可参考官方链接。

 

官方参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Luppiter.W

你的鼓励是我创作最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值