-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
123 lines (93 loc) · 4.78 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
intl-unicode and alt-intl-unicode
=================================
This is a XKB US keyboard layout that uses Unicode combining
characters instead of deadkeys. If you don’t know what the previous
sentence means, you’re probably not interested (short explanation:
Unicode combining characters are sexier, more powerful, and more
general; but you’d need to change your typing habits, and the
resulting output often is not well supported by applications (in fact,
the combining sequences in this very README might display wrong in
whatever you’re using to read it!)).
Two layouts are offered. “us(intl-unicode)” preserves equivalence
with “us(intl)” deadkey positions; “us(alt-intl-unicode)” breaks this
compatibility when I though doing so would be more mnemonic or
Unicodeish.
Installation
============
sudo cp us /usr/share/X11/xkb/symbols/us
or
sudo make install # copy over system file, with backup
sudo make install-ln # symlink system file to here, with backup
or, in Debian or Ubuntu,
sudo make divert # same as install, but prevent overwrite by dpkg
sudo make divert-ln # same as install-ln, but prevent overwrite by dpkg
I don’t know how to add custom layouts witout modifying the system
file, sorry. Be careful your packaging system might override the new
file (in Debian/Ubuntu, use dpkg-divert(8) to prevent that).
“uninstall” and “undivert” make targets are also provided.
Usage
=====
Choose one of:
setxkbmap -layout 'us(intl-unicode)'
setxkbmap -layout 'us(alt-intl-unicode)'
Typing in a combining-based layout has a few important differences
from “us(intl)”:
- You need to use the right Alt key (aka AltGr) to type combining
sequences (accents, diacritics, &c.). Pressing the keys alone will
just generate their ASCII versions immediately. This behavior is
just like the Xorg “us(altgr-intl)” variant; it is convenient for
programmers, but perhaps not for human beings.
- You type the modifiers after the base letters, not before. This is
like handwriting, and unlike typewriting. For example, with
us(intl):
<key '> → [nothing] ; <key a> → á
With us(intl-unicode):
<key a> → a ; <key AltGr '> → á
This postfix method has the advantage of avoiding hidden states;
pressing a key always change something in the screen.
- The combining sequences are stored internally by the computer as
separate “characters” (code points). In the example above:
- The letter “á” in the deadkeys version is the single code point
U+00E1 (latin small letter a with acute).
- The letter “á” in the combining version is stored as two code
points, U+0061 (latin small leter a) and U+0301 (combining acute
accent).
Applications differ on whether they’ll treat combining sequences as
a single character or not when editing, counting, searching,
formatting &c.
- You can combine multiple diacritics. Diacritics at the same
position (above, below) will generally stack outward. More than
two or three isn’t well-supported, but you can push it as long as
you want. With alt-intl-unicode:
<kbd c> <kbd AltGr ,> <kbd AltGr '>: ḉ # c with cedilla AND acute
<kbd a> <kbd AltGr '> <kbd AltGr -> <kbd AltGr ,> <kbd AltGr.>: ạ̧́̄
# a with acute, macron, cedilla, and dot below
Some fonts that support combining
=================================
- DejaVu (ttf; serif, sans, mono; free)
- Monospace (ttf; mono; free)
- Gentium (ttf; serif; free)
- -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1
(X; mono; free)
- efont (X; mono; free; should be used as fallback from core X font)
- Corbel (Verdana-like), Consola (Courier-like), and all other new
Vista fonts whose name start with C (Windows Vista)
Some fonts that do NOT support combining
========================================
- All vanilla Bitstream Vera and Liberation fonts (common in Linux)
- Verdana, Arial, Courier, and other pre-Vista Microsoft fonts
(common in Windows)
- Monaco, Lucida Grande (common in OS X)
Typing miscellaneous Unicode symbols
====================================
If you’re looking for convenient methods for inputting unusual Unicode
characters such as typographic symbols and dingbats, well, this is not
what this layout is about at all. I recommend setting a Compose key
(Multi_key) with xmodmap(1); then read
/usr/share/X11/locale/en_US.UTF-8/Compose to see the possibilities.
You can buff it up with your own Compose sequences in ~/.XCompose.
The Compose method is particularly useful in conjunction with
intl-unicode — you can input precomposed characters with Compose, and
combining characters with AltGr.
If you start to get addicted, perhaps you’d like to try the
pointless-xcompose package from yours truly.