LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Keyboard customization in X environment (http://www.linuxquestions.org/questions/linux-hardware-18/keyboard-customization-in-x-environment-510078/)

yae 12-13-2006 11:07 AM

Keyboard customization in X environment
 
Hello,

I need to add extra meanings to keystrokes in the X environment.
I believe I did the right thing adding right control key to modifier Mod3 with xmodmap.

The environment is French Ubuntu Edgy 6.10 with Gnome, French 105 keys PC keyboard layout.

Here is what was the default modifier table as returned by xmodmap -pm

xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)

After some reading about xmodmap, I issued the command :

xmodmap -e "remove control = Control_R" -e "add mod3 = Control_R"

The new modifier table became, as returned by xmodmap -pm

xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25)
mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3 Control_R (0x6d)
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)

As a result Control_R c just displays c, while Control_L c still shows the usual Control c behaviour.

My question is : how can I assign a new symbol (for example D) to Control_R c for all future X Window sessions on the machine ? In other words, how do I set the mod3 meaning for keystrokes ?

Thanks very much for your help

Yves-Antoine Emmanuelli
France

mrclisdue 12-13-2006 11:19 AM

keyTouch

Code:

keytouch.sf.net
may be of assistance to you as it allows you to 'permanently' modify your keyboard.

cheers,

yae 12-13-2006 11:49 AM

Quote:

Originally Posted by mrclisdue
keyTouch

Code:

keytouch.sf.net
may be of assistance to you as it allows you to 'permanently' modify your keyboard.

cheers,

Thanks for the hint, but my problem is not configuring extra function keys.
I need to configure an APL keyboard on top of a French layout. I found APL keymaps for US keyboards, using the mode switch key, but on a French keyboard the mode switch key is already used for characters such as backslah, arobas, brackets, which I do not want to override.

I have the feeling that an X configuration file has to be written and put somewhere (/etc/X11 ?) but I could not find anything really relevant.

Regards

Yves-Antoine

yae 12-17-2006 09:55 AM

There might be another way to achieve what I need :
On my Ubuntu 6.10 system with a 105 keys French keyboard layout, xmodmap -pke outputs 6 keysyms per keycode, although the manual page states that only the 4 first are keyable (key, shitf key, AltGr key, AltGr shift key). On French keyboard layout, the right Alt key is labelled AltGr. So if the Debian/Ubuntu guys coded these 5th and 6th characters, they must be useable somehow. But I tried all sorts of key combinations without any success.

Here is the beginning of the xmodmap -pke output :

keycode 8 =
keycode 9 = Escape
keycode 10 = ampersand 1 onesuperior exclamdown onesuperior exclamdown
keycode 11 = eacute 2 asciitilde oneeighth asciitilde oneeighth
keycode 12 = quotedbl 3 numbersign sterling numbersign sterling
keycode 13 = apostrophe 4 braceleft dollar braceleft dollar

Any idea on how to activate the 5th and 6th characters ?

Thanks for you help !
--
Yves-Antoine


All times are GMT -5. The time now is 12:47 AM.