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.

So I'm trying to create a combination of keys to generate ISO keys for the Portuguese layout, the key in question is the < >, pressing it will normally generate the < character, < > + Shift will generate the > character. So I'm trying to create a combination using xmodmap, and I want this to work for all the programs. I've been searching on Google and came up with this example for Control + P = Up:

xmodmap -e "keycode 33 = p P Up"

keycode 33 matches p, so where does Control come up in that command?

What I want is:

  • map Control + , to >
  • map Control + . to <
share|improve this question
1  
Thanks, it looks better :) –  Maxrunner Jun 29 '12 at 16:55
    
what happened to the answers? –  Maxrunner Jul 5 '12 at 10:55
    
why are the comments gone pple? –  Maxrunner Jul 5 '12 at 23:02
    
So yeah the control modifier isnt working...anyway what the position for the control? –  Maxrunner Jul 9 '12 at 9:36
    
anyone? why did the mods removed the answer? –  Maxrunner Jul 15 '12 at 15:44

1 Answer 1

The example from the other question is wrong.

xmodmap -e "keycode 33 = p P Up"

normally means that pressing AltGr + p will result in Up.

More precisely it means that pressing Mode_switch + p will result in Up.

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.

It is possible to map 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.

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.