LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-08-2005, 04:10 AM   #1
iXaarii
LQ Newbie
 
Registered: Jun 2005
Posts: 24

Rep: Reputation: 15
changing y and z keys back


I need to use some romanian characters sometimes so I use kxkb to change between keyboard layouts ... however I really hate it that y and z are switched. I tried switching them back by editing ro and ro2 from /etc/X11/xkb/symbols

what I did was switching the codes in the lines

key <AD06> { [ z, Z ] };
and
key <AB01> { [ y, Y ] };

then I did a reboot ... but it doesn't seem to have changed. Any sugestions?
 
Old 06-09-2005, 01:30 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
First find the keycode for 'z' and 'y' with xev tool
(in a xterm, type 'xev', then type 'z' and 'y' and
look the terminal output for keycode)

Once you have your keycodes, say
z=25 and y=29, try ;
Code:
xmodmap -e 'keycode 25 = y'
xmodmap -e 'keycode 29 = z'
 
Old 06-10-2005, 03:30 AM   #3
iXaarii
LQ Newbie
 
Registered: Jun 2005
Posts: 24

Original Poster
Rep: Reputation: 15
but what keymapping will this modify? just active one or all?
I use english most of the time and then periodically when I really have to I quickly switch back and forth with kxkb by ctrl-alt-k.
 
Old 06-10-2005, 04:01 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Well it is just 2 commands to type...

To roll back, just do the inverse :
Code:
xmodmap -e 'keycode 25 = z'
xmodmap -e 'keycode 29 = y'
You could put them in a script or in alias for more convenience

Last edited by keefaz; 06-10-2005 at 04:02 AM.
 
Old 06-16-2005, 07:21 AM   #5
iXaarii
LQ Newbie
 
Registered: Jun 2005
Posts: 24

Original Poster
Rep: Reputation: 15
indeed the y key now did y instead of z (in romanian mode) .. but z didn't change (insetead w did z) ... however it all changes back when I switch to english layout (I do that a lot with kxkb and a shortcut).
 
Old 06-25-2005, 09:31 PM   #6
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 14.04 (Dell Linux-preinstalled laptop + 2 other laptops)
Posts: 117

Rep: Reputation: 21
Quote:
xmodmap -e 'keycode 25 = z'
xmodmap -e 'keycode 29 = y'
Well, the reason it doesn't work is because keycode 25 is not the Z key; it's keycode 52 that's the Z key. Keycode 25 is (you guessed it!) the W key! So just put "52" instead of "25" in the example above.

For more info, check my posting about "xmodmap" that I've just posted (do a search on "xmodmap" and my username, "kwtm") or Google for info on "xmodmap", or type "man xmodmap" in a terminal to find out more. You might want to try the command "xmodmap -pke".
 
  


Reply



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
changing back to windows awesome_man Linux - Newbie 4 04-27-2004 01:27 PM
Directory permissions changing back? elderain Linux - Newbie 0 03-08-2004 06:02 PM
Changing back to KDE jamie_barrow Linux - Software 4 02-17-2004 11:21 AM
changing keyboard keys functions grizzly Slackware 2 01-10-2004 09:05 PM
Group Permissions changing back on their own jnezezon Linux - Networking 8 01-09-2004 01:47 AM

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

All times are GMT -5. The time now is 06:54 AM.

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