old-www/HOWTO/Intkeyb/x336.html

445 lines
9.2 KiB
HTML

<HTML
><HEAD
><TITLE
>Xmodmap theory and Xmodmap solution</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="How to setup international keyboard in X Window with Xmodmap and XKB"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="How to do it: this experimental solution is a legacy issue - do not read it if you use newer systems"
HREF="x89.html"><LINK
REL="NEXT"
TITLE="Character sets"
HREF="x476.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>How to setup international keyboard in X Window with Xmodmap and XKB</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x89.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x476.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN336"
></A
>4. Xmodmap theory and Xmodmap solution</H1
><P
>If you want to edit and make your own .Xmodmap keyboard layout definitions,
I'll explain one line of the .Xmodmap file to make clear what you should do.</P
><P
>This explanation can be used for all keycodes. For example, the line:</P
><P
>keycode 0x11 = 8 asterisk aacute 8</P
><P
>(note: keycode 0x11 is derived from the "xkeycaps" utility; you can also use
the X Window "xev" utility to explore keyboard puzzles.)</P
><P
>says that the first pair, the default one, (number "8" and "asterisk")
will display number "8" when you press keycode 0x11 ("8"), will display
asterisk when a "shift" key is pressed. After pressing the Scroll Lock,
there's another definition: ISO_NEXT_GROUP, which means that when you
press the default "8" key, no "8" will be displayed, but aacute (á);
when you press the "shift" key, number "8" will be displayed. So if
you change "aacute" and "8", anything you put instead of "aacute" and
"8" will be displayed, for example:</P
><P
>keycode 0x11 = 8 asterisk semicolon colon</P
><P
>will give you "semicolon" and "colon" in your 0x11 keycode after
pressing the Scroll Lock.</P
><P
>The ISO_NEXT_GROUP is defined by another line. If this line is not
defined, you will be able to use only two definitions ("8" and "asterisk") -
look at my .Xmodmap file. If you delete the ISO_NEXT_GROUP (the
next pair of definitions on the right), you will have only one group of
keyboard definitions ("8" and "asterisk"). Be careful when editing the .Xmodmap
file. You mustn't delete definitions that enable utilization of the
Scroll Lock unless you know what you are doing (or you map the second keyboard
by right Alt). These are the lines such as:</P
><P
>keycode 0x4e = ISO_Next_Group</P
><P
>add mod5 = ISO_Next_Group,</P
><P
>etc. You must also keep in mind that Unixes are case sensitive. If you want
to find out more about keycodes, install the package "xkeycaps" or use "xev".</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN349"
></A
>4.1. .Xmodmap sample file for the Slovak language typewriter layout</H2
><P
>The following .Xmodmap sample file consists of two groups of keyboard
definitions you my use in addition to your default or XKB keyboard choice.
You may use this file as an example to build your own keyboard maps. This
file needs editing for your specific purposes and it's here only as a hint.
If you change letters like "y Y" to "t T", you will have "t T", etc. on your
keyboard where you normally have "y Y" keys. So you see that thus you can
have almost absolute control of your keyboard - something which in Microsoft
Windows operating system can only be achieved by special and certainly
expensive programs. Use the Scroll Lock to switch between the first and second
group of key definitions.
_______________________cut_here_________________________</P
><P
>keycode 0x09 = Escape</P
><P
>keycode 0x43 = F1 F11 F1 Multi_key</P
><P
>keycode 0x44 = F2 F12 F2 F12</P
><P
>keycode 0x45 = F3 F13 F3 F13 idiaeresis</P
><P
>keycode 0x46 = F4 F14 F4 F14 mu yen</P
><P
>keycode 0x47 = F5 F15 F5 F15 guillemotright guillemotleft</P
><P
>keycode 0x48 = F6 F16 F6 F16 ograve</P
><P
>keycode 0x49 = F7 F17 F7 dead_abovedot oacute</P
><P
>keycode 0x4A = F8 F18 F8 dead_breve acute</P
><P
>keycode 0x4B = F9 F19 F9 dead_cedilla ugrave </P
><P
>keycode 0x4C = F10 F20 F10 dead_ogonek </P
><P
>keycode 0x5F = F11 F21 dead_acute dead_caron </P
><P
>keycode 0x60 = F12 F22 dead_abovering dead_diaeresis</P
><P
>keycode 0x6F = Print Execute dead_iota </P
><P
>keycode 0x4E = ISO_Next_Group</P
><P
>keycode 0x6E = Pause </P
><P
>keycode 0x31 = grave asciitilde semicolon dead_diaeresis </P
><P
>keycode 0x0A = 1 exclam plus 1 </P
><P
>keycode 0x0B = 2 at lcaron 2</P
><P
>keycode 0x0C = 3 numbersign scaron 3 </P
><P
>keycode 0x0D = 4 dollar ccaron 4</P
><P
>keycode 0x0E = 5 percent tcaron 5</P
><P
>keycode 0x0F = 6 asciicircum zcaron 6 </P
><P
>keycode 0x10 = 7 ampersand yacute 7 </P
><P
>keycode 0x11 = 8 asterisk aacute 8</P
><P
>keycode 0x12 = 9 parenleft iacute 9 </P
><P
>keycode 0x13 = 0 parenright eacute 0 </P
><P
>keycode 0x14 = minus underscore equal percent </P
><P
>keycode 0x15 = equal plus dead_acute dead_caron </P
><P
>keycode 0x33 = backslash bar ncaron parenright </P
><P
>keycode 0x16 = BackSpace</P
><P
>keycode 0x6A = Insert</P
><P
>keycode 0x61 = Home </P
><P
>keycode 0x63 = Prior </P
><P
>keycode 0x4D = Num_Lock Pointer_EnableKeys </P
><P
>keycode 0x70 = KP_Divide slash </P
><P
>keycode 0x3F = KP_Multiply asterisk</P
><P
>keycode 0x52 = KP_Subtract minus</P
><P
>keycode 0x17 = Tab ISO_Left_Tab</P
><P
>keycode 0x18 = q Q </P
><P
>keycode 0x19 = w W </P
><P
>keycode 0x1A = e E </P
><P
>keycode 0x1B = r R</P
><P
>keycode 0x1C = t T </P
><P
>keycode 0x1D = y Y z Z </P
><P
>keycode 0x1E = u U </P
><P
>keycode 0x1F = i I </P
><P
>keycode 0x20 = o O </P
><P
>keycode 0x21 = p P</P
><P
>keycode 0x22 = bracketleft braceleft uacute slash </P
><P
>keycode 0x23 = bracketright braceright adiaeresis parenleft </P
><P
>keycode 0x24 = Return </P
><P
>keycode 0x6B = Delete </P
><P
>keycode 0x67 = End </P
><P
>keycode 0x69 = Next</P
><P
>keycode 0x4F = KP_Home 7 KP_Home</P
><P
>keycode 0x50 = KP_Up 8 </P
><P
>keycode 0x51 = KP_Prior 9 </P
><P
>keycode 0x56 = KP_Add plus </P
><P
>keycode 0x42 = Caps_Lock </P
><P
>keycode 0x26 = a A</P
><P
>keycode 0x27 = s S </P
><P
>keycode 0x28 = d D </P
><P
>keycode 0x29 = f F </P
><P
>keycode 0x2A = g G </P
><P
>keycode 0x2B = h H</P
><P
>keycode 0x2C = j J</P
><P
>keycode 0x2D = k K </P
><P
>keycode 0x2E = l L </P
><P
>keycode 0x2F = semicolon colon ocircumflex quotedbl </P
><P
>keycode 0x30 = apostrophe quotedbl section exclam </P
><P
>keycode 0x53 = KP_Left 4</P
><P
>keycode 0x54 = KP_Begin 5</P
><P
>keycode 0x55 = KP_Right 6 </P
><P
>keycode 0x32 = Shift_L ISO_Next_Group </P
><P
>keycode 0x34 = z Z y Y </P
><P
>keycode 0x35 = x X </P
><P
>keycode 0x36 = c C </P
><P
>keycode 0x37 = v V</P
><P
>keycode 0x38 = b B </P
><P
>keycode 0x39 = n N </P
><P
>keycode 0x3A = m M </P
><P
>keycode 0x3B = comma less comma question</P
><P
>keycode 0x3C = period greater period colon </P
><P
>keycode 0x3D = slash question minus underscore</P
><P
>keycode 0x3E = Shift_R </P
><P
>keycode 0x62 = Up </P
><P
>keycode 0x57 = KP_End 1 </P
><P
>keycode 0x58 = KP_Down 2</P
><P
>keycode 0x59 = KP_Next 3</P
><P
>keycode 0x6C = KP_Enter Return</P
><P
>keycode 0x25 = Control_L ISO_Next_Group </P
><P
>!keycode 0x40 = Alt_L Meta_L </P
><P
>keycode 0x40 = Meta_L Alt_L </P
><P
>keycode 0x41 = space </P
><P
>keycode 0x71 = Alt_R Meta_R </P
><P
>keycode 0x6D = Control_R</P
><P
>keycode 0x64 = Left </P
><P
>keycode 0x68 = Down </P
><P
>keycode 0x66 = Right</P
><P
>keycode 0x5A = KP_Insert 0 </P
><P
>keycode 0x5B = KP_Delete period </P
><P
>!keysym Alt_L = Meta_L</P
><P
>!keysym F12 = Multi_key </P
><P
>clear Shift </P
><P
>!clear Lock</P
><P
>clear Control</P
><P
>clear Mod1 </P
><P
>clear Mod2</P
><P
>clear Mod3 </P
><P
>clear Mod4 </P
><P
>clear Mod5 </P
><P
>add Shift = Shift_L Shift_R </P
><P
>add Control = Control_L Control_R </P
><P
>!add Mod1 = Alt_L Alt_R</P
><P
>add Mod1 = Meta_L Alt_R </P
><P
>add Mod2 = Num_Lock</P
><P
>add Mod5 = ISO_Next_Group </P
><P
>!add Mod1 = </P
><P
>!add Mod2 = Alt_R Alt_L Mode_switch </P
><P
>keycode 0x73 = ISO_Next_Group</P
><P
>keycode 0x74 = dead_acute dead_diaeresis </P
><P
>keycode 0x75 = dead_caron dead_abovering</P
><P
>_____________________________cut_here_____________________________</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x89.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x476.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>How to do it: this experimental solution is a legacy issue - do not read it if you use newer systems</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Character sets</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>