LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to make Control_L + Alt_L act like Alt_R (Alt Gr)? (https://www.linuxquestions.org/questions/linux-general-1/how-to-make-control_l-alt_l-act-like-alt_r-alt-gr-449531/)

THROBiX 05-29-2006 04:17 AM

How to make Control_L + Alt_L act like Alt_R (Alt Gr)?
 
Hi!

I have a problem.. (I'm a Linux-newbie)
In Windows XP, I can press Ctrl (left) + Alt (left) + 2 to get "@", and Ctrl (left) + Alt (left) + 8 to get "[" etc.

In GNU/Linux, I have to press Alt Gr + 2 to get "@" and Alt Gr + 8 to get "[" etc.
I think that is bad, because I like to use the left Alt + left Ctrl to get these chars when I'm coding PHP etc, instead of using Alt Gr (Alt_R).

I'm using a Norwegian keyboard (no), and Ubuntu 6.06 Drapper Drake LTS, using GNOME.
I've heard that I can use "xmodmap", but I don't know how to change the keys and things.

It would be cool if someone could post the whole "xmodmap" code, to change these keys (get Control_L and Alt_R (when both is pressed) to act like Alt_R (Alt Gr)).

These are the chars I want to use with Control_L + Alt_L: "@ $ { [ ] }"

Thanks. :)

Xeratul 06-29-2006 03:09 AM

Quote:

Originally Posted by THROBiX
Hi!

I have a problem.. (I'm a Linux-newbie)
In Windows XP, I can press Ctrl (left) + Alt (left) + 2 to get "@", and Ctrl (left) + Alt (left) + 8 to get "[" etc.

In GNU/Linux, I have to press Alt Gr + 2 to get "@" and Alt Gr + 8 to get "[" etc.
I think that is bad, because I like to use the left Alt + left Ctrl to get these chars when I'm coding PHP etc, instead of using Alt Gr (Alt_R).

I'm using a Norwegian keyboard (no), and Ubuntu 6.06 Drapper Drake LTS, using GNOME.
I've heard that I can use "xmodmap", but I don't know how to change the keys and things.

It would be cool if someone could post the whole "xmodmap" code, to change these keys (get Control_L and Alt_R (when both is pressed) to act like Alt_R (Alt Gr)).

These are the chars I want to use with Control_L + Alt_L: "@ $ { [ ] }"

Thanks. :)


I have similar problem

I would like to exchange SHIFT_L + 1 and &
I tried xmodmap but could say to xmodmap both :
SHIFT and also 1 at same time ...

:scratch:

Some ideas ?

ncg 07-26-2006 06:21 AM

I'm not really sure maybe you could try 'stty -a' command and custom your key combinations.

ioerror 07-26-2006 08:53 AM

Quote:

Originally Posted by THROBiX
It would be cool if someone could post the whole "xmodmap" code, to change these keys (get Control_L and Alt_R (when both is pressed) to act like Alt_R (Alt Gr)).

This is not possible in X due to the stupid, defective way it handles modifier keys.

Quote:

Originally Posted by Xeratul
I would like to exchange SHIFT_L + 1 and &

This, however, is easy. Assuming that shift_L + 1 = ! and & is shift + 7, put this in your ~/.Xmodmap

Code:

keycode 10 = 1 ampersand
keycode 16 = 7 exclam

If you're not using a PC, you may have different keycodes, use xev to check.


All times are GMT -5. The time now is 03:52 PM.