LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   swapping " and @ keys on mac keyboard (https://www.linuxquestions.org/questions/linux-newbie-8/swapping-and-%40-keys-on-mac-keyboard-315963/)

alcibiades 04-22-2005 02:49 AM

swapping " and @ keys on mac keyboard
 
Hi,

I am using an old mac usb keyboard on Suse. Everything works fine, except that the " and @ keys are swapped. I have been trying to find out how to change them, and have a general idea of what to do, but not how precisely to go about it. This is what I think you have to do, and what I don't know is also indicated.

1) Find out what the " and the @ key is sending. [do you use xev for this? if so, what am I looking for?]

2) Use xkbdoptions to swap them. I think you do this by editing etc/X11/xorg, going down to the relevant section, and then putting something in - but what? The examples I've found tell you how to swap control and caps lock, but they don't tell me what the two keys I want to swap are called, and I can't find a syntax guide for xkbdoptions.

Finally, is there really, really no simple point and click tool that will do this?

Take care

Al

hairymnstr 04-22-2005 03:46 AM

" and @ keys are swapped on American keyboards I think, so try setting your keyboard language to English (UK) or English (US) depending on which one you aren't using now.

If not xev is the command you need to use, to findout the keycode - look for the keycode keyword in the jumble of text that xev outputs (remeber it will give two blocks of text for each key you press - one for the press and one for the release.

I don't know about editing the config files but lineak (linux easy access keyboard) tool might help, it should be one of the included packages with SUSE.

alcibiades 04-22-2005 01:57 PM

Yes, its true that you can go to a US keyboard, but the problem then is, you lose the £ sign, which is a bit irritating. Thanks for the lineak reference, I didn't know about it. Will try right away!

Al

alcibiades 04-23-2005 08:03 AM

Well, I know exactly what must be done, and after several hours work have no idea how to do it.

I ran xev, and discovered that the two keys I want to swap are

keycode 11
keysym 0x22, quotedbl

and

keycode 48
keysym 0x40, at

So, in accordance with the xmodmap manual exanples I became root and typed in

xmodmap -e "keysym quotedbl = at"

the only result of this was that the " key now vanished. I got it back by using the X configurer in Suse.

Thinking maybe I had misunderstood, I next omitted the spaces each side of the equals sign in the above command, but that aborted.

What we need is for someone to write a little interactive programme that goes
-- hit the first key you wish to swap
-- now hit the second key you wish to swap
-- you are going to swap __ and ___, are you sure? y/n
-- Done!

I am certain there must be people for whom this would take an afternoon. Maybe 10 minutes? Me, it will probably take a month, but I'm thinking of doing it as a public service to spare everyone else the grief....
Al


All times are GMT -5. The time now is 05:27 PM.