[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: keyboard HOWTO



> in my rxvt (thus via X) window, i turn off numlock and my keypad
> gives me
> 
> y
> x
> w
> v
> u
> t
> s
> w
> q
> p
> 
> 0 thru 9 gives p thru y -- but each keystroke inserted a new
> line above the previous. aha! ^V<keypadDigit> shows Op which
> is escape (vim thinks that means 'stop insert mode') then "O" as
> in capital oh (vim thinks 'open new line above') then "p" gets
> inserted.

In xterm this effect is absent. In rxvt I have the same behavior.
> 
> how can i type an accented e? or a c-cedilla? or a u-dieresis?
> 

There are many ways to do that. If you use xterm, you can get a Meta
key working and the 8bit characters are obtained by the 7bit ones
with meta key. Examples:

n is decimal 110, hex 6e, octal 156, bits 01101110
î is decimal 238, hex ee, octal 356, bits 11101110

so î is Meta-n

g is decimal 103, hex 67, octal 147, bits 01100111
ç is decimal 231, hex e7, octal 347, bits 11100111

so ç is Meta-g

An other way is to use the compose key. In my system that is
Ctrl-K, but some time is the Scroll Lock.

If you type Ctrl-K then ^ then i you get î. Ctrl-K then i then ^
is the same. ç is obtained with , and c or c and , and so on.
This is from kernel so it should work on many applications.
/usr/X11R6/lib/X11/locale/iso8859-1/Compose can show you more
combinations (if you use Latin1 encoding).

An other way is to customize your keyboard. You have to do it
in two steps because X and the console are using different
files.

/etc/X11/Xmodmap is for the X, but you may have a file
.xmodmap in your $HOME. This file you can generate
with xkeycaps, where you have to select your keyboard
and customize the keys you want. Click the right button
of the mouse on the letter e. Select edit keysym or key
and add a value (for instance egrave) in the third position.
Make sure you configure a key to be your AltGr. You can select the
right key or the win keys. The value for that is Mode_switch.

Save the file as .xmodmap and add in your .xsession file
the entry 
/usr/bin/X11/xmodmap .xmodmap

Then you get ebreve (é) using AltGr-e.

Of course you can edit the file by hand.

For console you have to edit the /etc/console/boottime.kmap.gz.
The mechanism is similar, for instance the line:
keycode  18 = e
has to be changed in
keycode  18 = +e		+E		+egrave		+Egrave

and also make sure you configure one key to be your AltGr
key. If you have win keys you do:
keycode 125 = AltGr
keycode 126 = AltGr

otherwise your right Alt will do from:
keycode 100 = Alt
to
keycode 100 = AltGr



I hope this help.

Ionel

P.S. If you start customizing your /etc/console/boottime.kmap.gz
you will loose some options. I had to add manually
control alt keycode 59 = Console_1
control alt keycode 60 = Console_2
...
alt keycode 105 = Decr_Console
alt keycode 106 = Incr_Console
etc.
to get back some useful stuff.


P.P.S. You can configure your Fx keys to insert some text you need
often, by replacing the line
string Fx = "\033[[D"
with
string Fx = "your text here"

such as:

string F10 = " ăâîşţ­ĂÂÎŞŢ "



Reply to: