如何使用xmodmap将Ctrl-p映射到向上箭头?


10

我确实读过xmodmap的语法部分,但仍然不知道该怎么做。


也许有一种方法可以直接从gnome中将Ctrl-p / Ctrl-n映射为向上/向下键。任何人?
VitoshKa

Answers:


3

这不容易实现。

xmodmap手册页所述:

The first keysym is used when no modifier key is pressed in conjunction with
this key, the second with Shift, the third when the Mode_switch key is used
with this key and the fourth when both the Mode_switch and Shift keys are used.

默认情况下,AltGr是Mode_switch键。

可以将其他(或AltGr)作为Mode_switch键映射,例如右键Ctrl

xmodmap -e "keycode 105 = Mode_switch Mode_switch"

但是,问题在于密钥将不再像普通Ctrl密钥一样起作用。

顺便说一句:有一个问题正好要问如何使用该Ctrl键作为修饰符键: 如何将Control用作xmodmap的修饰符?


1

尝试:

xmodmap -e "keycode 33 = p P Up"

让我知道这是否是您想要的结果。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.