hotkeys - 糟糕的.key中的电源按钮
问题描述
如何在笔记本电脑上设置电源按钮操作?我尝试使用awful.key({ }, "Power",...
,但它不起作用。
解决方案
尝试xev
在终端中运行,看看它对按键的含义。例如,我的键盘上有一个计算器键,它似乎是XF86Calculator
:
KeyRelease event, serial 37, synthetic NO, window 0x2400001,
root 0x761, subw 0x0, time 179605294, (572,728), root:(2493,769),
state 0x10, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
以下是对密钥名称的一些随机猜测:
$ grep -r Power /usr/include/X11
/usr/include/X11/Xtrans/Xtranslcl.c: * Pittsburgh Powercomputing Corporation (PPc)/Quarterdeck Office Systems
/usr/include/X11/XF86keysym.h:#define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */
/usr/include/X11/XF86keysym.h:#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */
/usr/include/X11/Sunkeysym.h:#define SunXK_PowerSwitch 0x1005FF76
/usr/include/X11/Sunkeysym.h:#define SunXK_PowerSwitchShift 0x1005FF7D
推荐阅读
- package - Xilinx Vivado 2019.2 - Vitis - package_project - 错误:[Common 17-161] Invalid option value '' specified for 'objects'
- inno-setup - 为什么 _issi.cfg 文件在 Inno Setup 中不起作用?
- azure-devops - 是否可以仅在某些 Azure Devops 项目中禁用市场扩展?
- bash - 如何抑制参数扩展中的通配?
- angular - 我如何将 id 值作为下拉列表中的数字传递
- amazon-web-services - kubeadm 初始化阶段上传配置失败
- python-3.x - Twython get_retweets 方法在数字或参数上给出错误
- php - 如何在codeigniter中对变量值进行验证
- java - 如何让用户从前端下载 -in backend generated- CSV 文件?
- angular - 如果路径“**”存在,登录 url 会错误地重定向到它