gpt4 book ai didi

ubuntu - 如何将 key 绑定(bind)到ubuntu中的另一个 key ?

转载 作者:行者123 更新时间:2023-12-04 18:42:21 26 4
gpt4 key购买 nike

我想将我的“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.



http://ubuntuforums.org/archive/index.php/t-354969.html

关于ubuntu - 如何将 key 绑定(bind)到ubuntu中的另一个 key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3177953/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com