Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I did read the grammar section of xmodmap but still couldn't figure out how I could do it.

share|improve this question
    
May be there is a way to map Ctrl-p/Ctrl-n to behave as up/down keys directly from gnome. Anyone? –  VitoshKa Aug 14 '11 at 12:21

3 Answers 3

This isn't easily possible.

As the xmodmap man page states:

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.

By default, AltGr is the Mode_switch key.

It is possible to map a different or additional (to AltGr) as the Mode_switch key, e.g. the right Ctrl key:

xmodmap -e "keycode 105 = Mode_switch Mode_switch"

The problem however is that the key then won't work as normal Ctrl key anymore.

Btw: There is a question, which asks for precisely, how to use the Ctrl key as a modifier key: How to use Control as modifier with xmodmap?

share|improve this answer

Try:

xmodmap -e "keycode 33 = p P Up"

and let me know if it's the result you're looking for.

share|improve this answer

As nidi said, that isn't easily possible with xmodmap.
However it's super easy with AutoKey.
See the following answer as an example: http://askubuntu.com/a/303978/140789

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.