]> gitweb.michael.orlitzky.com - emacs-keys.git/blob - doc/README
7158d0696de8232128cbef2ae95607da0a748fac
[emacs-keys.git] / doc / README
1 == Overview ==
2
3 This package contains two files that can be used to alter your
4 keyboard layout, either in the system console or within X.org (or
5 both):
6
7 * Your physical "Alt" keys act like "Ctrl" keys.
8 * Your physical "Ctrl" keys act like "Alt" keys.
9 * Your physical "Caps Lock" key acts like the "Alt" key.
10
11 This makes emacs (and any readline-based application) easier to use, I
12 promise.
13
14 The console map probably only works on i386 qwerty keyboards, because
15 that's all I have.
16
17 The files:
18
19 1. src/console.map
20
21 This affects the Linux system console and virtual terminals; that
22 is, the things that you switch between with Ctrl-Alt-FN, and the
23 thing that you're looking at before you start X.org. The console.map
24 file is input for the "loadkeys" utility that is part of KBD
25 project <http://kbd-project.org/> and is provided by sys-apps/kbd
26 on Gentoo.
27
28 2. src/Xmodmap
29
30 This affects the X.org system, and your graphical terminals. It
31 should be fed into the "xmodmap" utility that is part of X.org
32 and which is provided by x11-apps/xmodmap on Gentoo.
33
34 == Installation ==
35
36 Either of those files can be loaded manually regardless of where they
37 live; for example,
38
39 $ loadkeys /path/to/console.map
40 $ xmodmap /path/to/Xmodmap
41
42 The "install-console" and "install-xorg" makefile targets will install
43 both files to $(PREFIX)/share/emacs-keys by default. The value of the
44 PREFIX variable defaults to /usr/local but can be specified to make;
45 for example,
46
47 $ make PREFIX=/usr install-console
48
49 For the Xmodmap file, that's about as good as it gets. To use it, you
50 will typically add something like the following to your ~/.xinitrc,
51
52 emacsmodmap=/usr/share/emacs-keys/Xmodmap
53 if [ -f $emacsmodmap ]; then
54 # It doesn't work unless you do it twice, don't ask me why.
55 xmodmap $emacsmodmap
56 xmodmap $emacsmodmap
57 fi
58
59 The console map on the other hand can be loaded by OpenRC, which
60 starts a "keymaps" service at boot time. The configuration file for
61 that service is usually located at /etc/conf.d/keymaps, and if you set
62
63 extended_keymaps="/usr/share/emacs-keys/console.map"
64
65 in there, then OpenRC will load the emacs keymap on top of your
66 default one when the system boots.