View previous topic :: View next topic |
Author |
Message |
ew n00b
Joined: 28 Aug 2004 Posts: 47
|
Posted: Thu Aug 27, 2009 12:23 pm Post subject: [SOLVED]Remap normal keys from standard layout fdi/evdev/hal |
|
|
I'm upgraded my xorg-server to the stable version 1.5.3-r6 and everything went fine.
Keyboard is working with the fdi/evdev/hald combination but I'm curious how to remap a single key? I'm using the normal US layout and I need some extra characters like german umlauts and I try to exchange the 'y' and the 'z' keys.
I achived the later (before the update) with the following lines in my ~/.Xmodmap:
Code: | ! y<->z
keycode 29 = z Z yen
keycode 52 = y Y guillemotleft less |
Is xmodmap still state of the art? Or what it "the way" to change mappings on fdi/evdev/hald systems? I googled a lot about this topic but I found only people with mouse button problems or something else.
Thanks for the feedback!
Last edited by ew on Sat Aug 29, 2009 7:40 am; edited 1 time in total |
|
Back to top |
|
|
Clad in Sky l33t
Joined: 04 May 2007 Posts: 887 Location: Germany
|
Posted: Thu Aug 27, 2009 3:23 pm Post subject: |
|
|
Hi.
Have you tried to alter the keymap in
/usr/share/keymaps
? _________________ Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest |
|
Back to top |
|
|
ew n00b
Joined: 28 Aug 2004 Posts: 47
|
Posted: Thu Aug 27, 2009 7:58 pm Post subject: |
|
|
Thanks for your feedback.
AFAIRC... well the keyboard maps under /usr/share/keymaps are for the (text-) console not for the X11 Server. |
|
Back to top |
|
|
ew n00b
Joined: 28 Aug 2004 Posts: 47
|
Posted: Sat Aug 29, 2009 7:40 am Post subject: |
|
|
Here we go (in a nutshell)
- Removed xf86-input-keyboard und xf86-input-mouse, added xf86-input-evdev to replace them
- The flags INPUT_DEVICES="evdev" and USE="hal" are important here for the xorg-server
- Goto /usr/share/X11/xbk/rules/xorg.lst and add the line "new new" in the "! Layout" section, add a <layout>...</layout> section in /usr/share/X11/xkb/xorg.xml file
- Create a new layout named "new" under /usr/share/X11/xkb/xorg.xml (I've copied the "us" layout, removed all variants and made my modifications)
- Load your new layout with "setxkbmap -option grp:shift_toggle -layout us,new". Pressing both shift keys will change the keyboard layout between new and us. Check everything is working.
- Modify the 10-xinput-configuration.fdi (see below, I've turned CAPS lock into annother a CTRL key)
- Reboot
Everything is fine.
Beware: That will only change X11 stuff, not the console.
My /etc/hal/fdi/policy/10-xinput-configuration.fdi looks like this:
Quote: |
<deviceinfo version="0.2">
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.xkb.layout" type="string">new</merge>
<merge key="input.xkb.variant" type="string" />
<merge key="input.xkb.options" type="string">ctrl:nocaps</merge>
</match>
</deviceinfo>
|
|
|
Back to top |
|
|
|