LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-29-2006, 04:17 AM   #1
THROBiX
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
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.

Last edited by THROBiX; 05-29-2006 at 01:13 PM.
 
Old 06-29-2006, 03:09 AM   #2
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,685

Rep: Reputation: 256Reputation: 256Reputation: 256
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 ...



Some ideas ?
 
Old 07-26-2006, 06:21 AM   #3
ncg
LQ Newbie
 
Registered: Mar 2006
Posts: 8

Rep: Reputation: 0
I'm not really sure maybe you could try 'stty -a' command and custom your key combinations.
 
Old 07-26-2006, 08:53 AM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make apache act like samba? williamwbishop Linux - Software 1 02-23-2006 04:10 AM
Anyone know of a live-cd which can make my p166 act like a Wireless Bridge? Royle Linux - Wireless Networking 2 09-14-2004 01:27 PM
How do I make my USB flash drive act like a normal disk? KingofBLASH Linux - Hardware 2 09-13-2004 08:26 PM
How to make Alt+Ctrl+DEL work in linux Boffy Linux - General 6 08-15-2004 06:32 AM
how do i make gnome act like i want ? PunkPT Linux - Software 0 07-29-2004 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration