Difference between revisions of "Compose keys"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
(7 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
     XFilterEvent returns: True
 
     XFilterEvent returns: True
 
You see the keycode is '''''134'''''. So define it as your compose-key:
 
You see the keycode is '''''134'''''. So define it as your compose-key:
  xmodmap -e "keycode 134 = Multi_key"
+
  xmodmap -e "keycode ''134'' = Multi_key"
 
Now press the right Windows key, then the ",", then the "c". You see a "ç". Cool, eh?
 
Now press the right Windows key, then the ",", then the "c". You see a "ç". Cool, eh?
  
Other combinations:  
+
There are many more combinations, but all of them will be forgotten if you start a new graphical session. To keep the change, create a file ~/.Xmodmap containing the line:
{| You want || you type the compose key plus
+
keycode 134 = Multi_key
 +
Then press Ctrl_Alt_Backspace to restart your X Window System.
 +
 
 +
=  Key combinations =
 +
{|class="wikitable sortable" border=1
 +
! You want !! you type the compose key plus
 +
|-
 
| ä || "a
 
| ä || "a
 
|-
 
|-
 
| ö || "o
 
| ö || "o
 
|-
 
|-
| " u || ü
+
| ü || "u
 
|-
 
|-
| " A || Ä
+
| Ä || "A
 
|-
 
|-
| " O || Ö
+
| Ö || "O
 
|-
 
|-
| " U || Ü
+
| Ü || "U
 
|-
 
|-
 
| ß || ss
 
| ß || ss
 
|-
 
|-
 
| ą || ;a
 
| ą || ;a
 +
|-
 +
| ę || ;e
 +
|-
 +
| ć || 'c
 +
|-
 +
| ś || 's
 +
|-
 
|}
 
|}
  
Line 36: Line 49:
 
= See also =
 
= See also =
 
* [[configure your keyboard layout]]
 
* [[configure your keyboard layout]]
 +
* [[keyboard]]

Latest revision as of 07:30, 14 April 2013

If you press a ` and an e, you get an è. In this case the key ` is called a dead key because it is at first stroke dead. A bit more tricky is the compose key. Press the compose key and then type two keys, and both keys will be combined. E.g. type the compose key, then the comma, then c and the outcome is ç.

Let's define your right Windows key as your compose key. To do this, open a console, start the program xev and press the right Windows key. You get an output like

KeyPress event, serial 34, synthetic NO, window 0x3400001,
    root 0x1d8, subw 0x0, time 287118161, (229,-209), root:(233,584),
    state 0x10, keycode 134 (keysym 0xff20, Multi_key), same_screen YES,
    XKeysymToKeycode returns keycode: 116
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

You see the keycode is 134. So define it as your compose-key:

xmodmap -e "keycode 134 = Multi_key"

Now press the right Windows key, then the ",", then the "c". You see a "ç". Cool, eh?

There are many more combinations, but all of them will be forgotten if you start a new graphical session. To keep the change, create a file ~/.Xmodmap containing the line:

keycode 134 = Multi_key

Then press Ctrl_Alt_Backspace to restart your X Window System.

Key combinations

You want you type the compose key plus
ä "a
ö "o
ü "u
Ä "A
Ö "O
Ü "U
ß ss
ą ;a
ę ;e
ć 'c
ś 's

The compose keys are defined for the english locale in /usr/share/X11/locale/en_US.UTF-8/Compose

See also