Keyboard definitions: Difference between revisions
Jump to navigation
Jump to search
(→See also: mention Category:Keyboard layouts) |
(Do you love your mom?) |
||
Line 1: | Line 1: | ||
At 3 yrs old we say: "Mommy, I love you". |
|||
The X keyboard files are in <tt>/usr/share/X11/xkb/symbols/</tt> on the OLPC (possibly elsewhere such as <tt>/etc/X11/xkb/symbols/</tt> depending on your Linux distribution). Most of the keyboard file names are two-letter language codes, or are based on those codes. |
|||
At 10: "Mom whateve!" |
|||
The upstream location for these keyboard layouts is at [http://webcvs.freedesktop.org/xkeyboard-config/xkeyboard-config/symbols/ freedesktop.org] |
|||
Before starting work on a new keyboard layout, check if there is one already there for you. In general, the country code is used for the name of the keyboard layout file; there are a few exceptions, such as "ar" for [[Arabic]] which is spoken in several countries. |
|||
At 16:"My mom is so annoying"<img>http://www.popclubs.com/images/3.gif</img> |
|||
Each desktop manager has it own keyboard switching applet. |
|||
At 18: "I wanna leave this house". |
|||
In GNOME, the Keyboard Indicator applet (gnome-keyboard-applet) shows the currently selected layout on the panel, and also allows to configure different options from the graphical interface. To activate, right-click on an empty space on the panel, then click Add to panel. Then, pick Keyboard Indicator and proceed with the configuration. |
|||
At 25:"Mom, you were right". |
|||
In KDE, the kxkb applet places an icon in the toolbar allowing you to select from the keyboards you have configured, or to configure others. You can also access it from the KDE Control Center on the main menu, in order to turn on the toolbar icon, if you don't like setting it up from the command line. |
|||
At 30: "I wanna go back to my Mom's house" |
|||
To add a keyboard layout, select a keyboard file similar to what you need, if possible, and copy it to a working directory. Edit the tables and the description, and save with the name you want to use, preferably the language code, or using the form language_version, such as en_US (US [[English]]) or fr_CH (Swiss [[French]]). As root, place your new keyboard file in the appropriate directory. Add your file name and language name to the keyboard list file <tt>/etc/X11/xkb/rules/xfree86.lst</tt> or <tt>/etc/X11/xkb/rules/xorg.lst</tt>, depending whether you are using a version of X from XFree86 or one from X.org. |
|||
At 50: "I don't wanna lose my Mom".<img>http://www.popclubs.com/images/6.gif</img> |
|||
When your keyboard layout is working to your satisfaction, post it to the Freedesktop Bugzilla by adding a report similar to |
|||
At 70: "I would give up EVERYTHING for my Mom to be here with me". |
|||
[https://bugs.freedesktop.org/show_bug.cgi?id=4818 this post] |
|||
You only have one Mom. |
|||
The maintainer of the keyboard layouts will have a look at it and when everything is ok, it will be added to the keyboard package. Then, it will propagate to all other distributions. |
|||
*LIke if u ? ur mom*:***! |
|||
Notes provided by Pablo Saratxaga of Mandriva Linux. Rewriting needed. |
|||
<pre> |
|||
The X11 keyboard layouts are simple text files; in each file there |
|||
may be one or more layouts defined. |
|||
A layout can include some other one instead of redefining common things. |
|||
It has a name: |
|||
name[Group1]="Foo"; |
|||
that is used by some keyboard selection tools. |
|||
Then, it defines the needed keys. |
|||
For unicode keysyms, you have to add 0x1000000 to the unicode value. |
|||
For characters that can be defined with the literal keysyms (all those |
|||
in ascii and iso-8859-*) it is better to use them (eg, "space" instead |
|||
of "0x1000020"). |
|||
individual keys are defined like this: |
|||
key <CODE> { [ normal, shift, altgr, altgr_shift ] }; |
|||
the CODE for a key is Axyy with x a letter to identify the row it is in: |
|||
E: the row with the digits |
|||
D: top row of letters |
|||
C: middle row |
|||
B: bottom row |
|||
A: the row of space bar |
|||
and yy is a number (in decimal notation) identifying the column: |
|||
01, 02, 03, 04, ...., 09, 10, 11, ... |
|||
some keys have special codes: LSGT, TLDE, BKSL, as they change their |
|||
position depending on the keyboard models. |
|||
and then all the special keys (space, control, function keys, numeric keypad, |
|||
etc) have special names too (but most often you don't need to redefine |
|||
them) |
|||
the best is to just take an existing layout file, and edit it to match |
|||
what you need. |
|||
To test it without restarting X, just launch: setxkbmap "xx" |
|||
or: setxkbmap "xx(yy)" |
|||
the first will load the default layout on the file "xx", the second |
|||
will load the layout "yy" of the file "xx". |
|||
If you need to load a non-latin layout; load also a latin one; otherwise |
|||
you are in big trouble :-) (unless you have some other way to change |
|||
keyboards, such as a toolbar menu.) |
|||
For example: setxkbmap "fr,tifinagh(extended)" -option "grp:shifts_toggle" |
|||
loads both the French (fr) and tifinagh(extended) layouts; |
|||
and defines pressing both shift keys to toggle between those layouts. |
|||
It is possible to cheat a bit, by sending an unused unicode value, |
|||
and having the Compose file redefine that to the wanted string. |
|||
I have done it for arabic and tifinagh layouts; it works quite well. |
|||
</pre> |
|||
It is not difficult to learn the file format by reading files in <tt>/etc/X11/xkb</tt>, including the various READMEs, but it is easier if you refer to the complete specification can be found at [http://www.x-docs.org/XKB/XKBproto.pdf x-docs.org] |
|||
A keyboard file usually has a two-letter name, from the [http://www.iana.org/assignments/language-subtag-registry IANA Language Subtag Registry], which replaces the obsolete [[ISO 639]] standard for [[language codes]]. |
|||
When you are satisfied with a keyboard file, you can copy it to <tt>/etc/X11/xkb/symbols</tt>, where programs like KDE Control Center will pick it up automatically the next time you start X. (Look under Regional & Accessibility for Keyboard Layouts.) You can put any selection of keyboards on a toolbar menu. |
|||
We need somebody to comb through the keyboards available in the various Linux distributions, starting with Mandriva, and add them to the Laptop distribution. Anybody? I'll help.--[[User:Mokurai|Mokurai]] 00:00, 13 October 2006 (EDT) |
|||
The location of the upstream keyboard layouts is at [http://webcvs.freedesktop.org/xkeyboard-config/xkeyboard-config/symbols/ freedesktop.org] If you are creating the [[Greek]] OLPC, you simply need to take the "gr" file (you can even simplify it by removing ancient Greek support which some students may find confusing) |
|||
== See also == |
|||
* [[Enabling XO features on other distributions]] for how OLPC handles some special keys and buttons directly. |
|||
* [[:Category:Keyboard layouts]] for the keyboard layouts and graphics shipped to different [[deployments]]. |
|||
* [[Input methods]] for writing systems that cannot be typed in a standard xkb [[Keyboard layouts|keyboard layout]], such as [[Chinese]] Hanzi, [[Japanese]] Kanji, [[Korean]] Hanja and Hangeul, Ethiopic, and others. |
|||
[[Category:Keyboard]] |
Revision as of 08:42, 19 December 2011
At 3 yrs old we say: "Mommy, I love you".
At 10: "Mom whateve!"
At 16:"My mom is so annoying"<img>http://www.popclubs.com/images/3.gif</img>
At 18: "I wanna leave this house".
At 25:"Mom, you were right".
At 30: "I wanna go back to my Mom's house"
At 50: "I don't wanna lose my Mom".<img>http://www.popclubs.com/images/6.gif</img>
At 70: "I would give up EVERYTHING for my Mom to be here with me". You only have one Mom.
- LIke if u ? ur mom*:***!