- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想将我的“WASD”映射到箭头。
我不喜欢动我的手。我已经通过调用 W 为 arrowUp 为我的编辑器修复了它。
但是,我怎样才能为整个系统绑定(bind)它呢?
当我调用 W 时,我希望它调用向上箭头。
我当时无法将这些键绑定(bind)到一个软件。
有任何想法吗?
谢谢。
-hbt
最佳答案
To determine the keycodes for keys on your keyboard, you can run a program called "xev". When running, you just press keys and you'll see the codes appear in the program. By keeping track of these you can make changes to the keys that need updating.
Then, you use a commandline program called "xmodmap (http://cf.ccmr.cornell.edu/cgi-bin/w3mman2html.cgi?xmodmap(1))" to remap a keystroke. So for instance:
xmodmap -e 'keycode 234=F2'
This would remap the key on the keyboard that generates keycode signal 234 to now be treated as the "F2" key. You can read the xmodmap documentation online to determine how to refer to various keystrokes.
So then you can build up a list of xmodmap lines, and put them all in a script that gets executed at login time, so that your keyboard is mapped the way you like.
关于ubuntu - 如何将 key 绑定(bind)到ubuntu中的另一个 key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3177953/
我是一名优秀的程序员,十分优秀!