keyboard remapping



Greetings.

I'm running Debian unstable on AMD64. I have X and (for the time
being), GNOME. My locales are en_US.UTF-8, although i'd rather they
were pt_PT.UTF-8 by default. My keyboard map is portuguese, it has
deadkeys. In particular, the ^ key. If i press ^ and e, i'll get ê.
I'd like to do the same with 6 other letters and there are 3 ways.

- The correct one, where ^+letter would result in that same letter with ^
- the lazy one, where AltGr+letter would be used (i was previously
using this in another machine)
- the practical one: typing ex would produce ê

After using xmodmap -pke i wrote this file, called .eoklavoj:
keycode 30 = u U ubreve Ubreve downarrow uparrow
keycode 39 = s S scircumflex Scircumflex ssharp section
keycode 42 = g G gcircumflex Gcircumflex eng ENG
keycode 43 = h H hcircumflex Hcircumflex hstroke Hstroke
keycode 44 = j J jcircumflex Jcircumflex
keycode 54 = c C ccircumflex Ccircumflex cent copyright

...which is in my home. So issuing "xmodmap .eoklavoj" would produce
the desired effect. If i issue "xmodmap -pke" again, in fact those
letters appear to be changed. However, in terminal, xchat, iceweasel,
gedit, abiword, etc, etc they still have thir normal AltGr+
funtionality. C, for instance, still produces ¢ and (c), noc
c_with_circumflex.

This would be the lazy way. The output of xmodmap -pke does show all
the letters i want to change, and also the [~^] key, which is:
keycode 51 = dead_tilde dead_circumflex dead_grave dead_breve
dead_grave dead_breve
However, i couldn't find where is it defined which letters get to be
accented. I can easily produce ã, but not ~s for instance. If i want
to do it the right way instead of the easy way i'd need this
information and probably wouldn't need to fiddle with xmodmap.

This is xev's output when i press AltGr+s:
KeyPress event, serial 29, synthetic NO, window 0x2c00001,
root 0x135, subw 0x0, time 4196303626, (87,-7), root:(91,41),
state 0x10, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 29, synthetic NO, window 0x2c00001,
root 0x135, subw 0x0, time 4196303829, (87,-7), root:(91,41),
state 0x90, keycode 39 (keysym 0xdf, ssharp), same_screen YES,
XLookupString gives 2 bytes: (c3 9f) "ß"
XmbLookupString gives 2 bytes: (c3 9f) "ß"
XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x2c00001,
root 0x135, subw 0x0, time 4196303912, (87,-7), root:(91,41),
state 0x90, keycode 39 (keysym 0xdf, ssharp), same_screen YES,
XLookupString gives 2 bytes: (c3 9f) "ß"

KeyRelease event, serial 29, synthetic NO, window 0x2c00001,
root 0x135, subw 0x0, time 4196304038, (87,-7), root:(91,41),
state 0x90, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XLookupString gives 0 bytes:

I've tried this in windowmaker, same thing. I've tried it under root,
same thing. What am i missing here?

Please do not quote my whole message when replying.

--
Fica bem, porta-te mal.
Be well, misbehave.


Relevant Pages

  • keyboard remapping (repost)
    ... I'd like to do the same with 6 other letters and there are 3 ways. ... After using xmodmap -pke i wrote this file, ... keycode 39 = s S scircumflex Scircumflex ssharp section ... KeyPress event, serial 29, synthetic NO, window 0x2c00001, ...
    (Debian-User)
  • Re: [SLE] Request for help with Euro-sign
    ... After having modified the key-settings with xmodmap, ... keycode 26 = e E EuroSign cent ... KeyPress event, serial 25, synthetic NO, window 0x2e00001, ...
    (SuSE)
  • Re: custom key commands
    ... F&R is a funny beast with a mind of its own; it doesn't always work as you might expect with non-ascii characters but sometimes it does what you want without quite managing to show it correctly. ... window, and then it's fine. ... (One of the letters that insists on its own font -- sometimes Times ...
    (microsoft.public.word.docmanagement)
  • Re: Ctrl-Alt-Fx wont switch between virtual consoles after Sarge->Etch
    ... keycode 37 (keysym 0xffe3, ... to make the left ALT key work normally again. ... This is what I get when I run xmodmap without arguments: ...
    (Debian-User)
  • Re: Extract Data for Mail Merge
    ... printed/mailed/faxed/created - as you select in next window. ... In Merge window, press Query Options. ... > the required letters. ...
    (microsoft.public.excel.misc)