You are not logged in.

#1 2009-02-07 18:23:45

Mogger
Member
From: Sweden
Registered: 2008-12-07
Posts: 153
Website

[SOLVED] xmodmap, alt-gr + j or n

OK, so I've set up my own keyboard layout with xmodmap. Other than remapping to Dvorak, I have different symbols for almost all <alt-gr> + <letter> combinations. For example, I can type '(' by pressing <alt-gr><e>.

Now to the problem: this works very well, except for two keys: j and n. <alt-gr><j> only inputs 'j', even if I specify something else. Same for 'n'. I've tried different keyboards, and today also on my laptop, all with the same result.

After some searching I found a guy with the same problem in a German forum, but the solution posted there didn't help. Any archer who knows how to fix it?

Last edited by Mogger (2009-02-10 20:44:04)

Offline

#2 2009-02-07 18:38:47

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [SOLVED] xmodmap, alt-gr + j or n

No, but I have the same problem smile

http://bbs.archlinux.org/viewtopic.php?id=63799


(lambda ())

Offline

#3 2009-02-07 19:28:28

Mogger
Member
From: Sweden
Registered: 2008-12-07
Posts: 153
Website

Re: [SOLVED] xmodmap, alt-gr + j or n

Ah. I thought that I couldn't be the only one affected, but at least I find it hard to search for issues such as this one.

Maybe worth noting: if I run xmodmap -pke before remapping, I get
keycode  44 = j J
keycode  57 = n N

Suspicious. All other letters look like this: keycode  43 = h H hstroke Hstroke hstroke Hstroke. Why are j and n special?

andre.ramaciotti, what do you mean with "[kind of solved]"?

Offline

#4 2009-02-07 19:36:25

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [SOLVED] xmodmap, alt-gr + j or n

It's kind of solved because I found another to have the characters I wanted (œ and Œ), but still n and j won't work with alt gr + them.

Both my keys, before I xmodmap them are:

keycode  44 = j J j J j J
keycode  57 = n N n N n N

but altering them won't do.


(lambda ())

Offline

#5 2009-02-10 20:43:34

Mogger
Member
From: Sweden
Registered: 2008-12-07
Posts: 153
Website

Re: [SOLVED] xmodmap, alt-gr + j or n

Hah. Great mystery solved.

You can even ask X to have AltGr-A generate "cursor left" instead of æ. Here's the rub: you can do it with the A key. You can't do it with the J key.

What!, you say. Actually, on vanilla X, this will work. Where vanilla X is "X without the XKB extension." If you disable XKB using export XKB_DISABLE=1 before calling the program you need the funny key-layout in (usually your entire session), this will also work. Why doesn't it with XKB? It doesn't work with XKB apparently because in the XKB setup for "my" country, the A key has some keysyms defined in the AltGr layer, and the J key doesn't. And if they don't exist, you can't overwrite them. I consider this a bug.

Source.

I think I'll do it the "proper" way with xkb instead of xmodmap. Just have to figure how.

Offline

#6 2009-02-10 21:09:06

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [SOLVED] xmodmap, alt-gr + j or n

If you find out how to do it, can you post it here, please? smile


(lambda ())

Offline

#7 2009-02-11 00:20:52

Mogger
Member
From: Sweden
Registered: 2008-12-07
Posts: 153
Website

Re: [SOLVED] xmodmap, alt-gr + j or n

Sure. First I read through some guides, such as this one. Then I found the files in Arch (/usr/share/X11/xkb/symbols) and just started hacking on it. I modified the Dvorak part of the Swedish layout and after some fixing -> restart X -> fixing -> restart X it worked.

Now I have a _really_ annoying problem. It inputs Dvorak, but the shortcuts in KDE are still QWERTY. For example, if I hit ctrl+o in Dvorak, KDE things I've hit ctrl+s.

Guess I'll start a separate topic about it.

Offline

#8 2009-02-11 12:36:16

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [SOLVED] xmodmap, alt-gr + j or n

Thanks! smile


(lambda ())

Offline

Board footer

Powered by FluxBB