zsh-users
 help / color / mirror / code / Atom feed
* Key bindings for ISO-8859-1
@ 1997-07-01 11:59 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 1997-07-01 11:59 UTC (permalink / raw)
  To: Zsh users list

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

On the subject of 8-bit fonts... here is a set of key bindings useful
for inserting accented characters and similar for ISO-8859-1 (which is
the standard encoding for X-windows fonts in countries with the latin
alphabet).  It's really for people without keyboard support for
accented characters, but it does have the advantage that the shell
knows the character is to be literal rather than a command sequence.
This could probably usefully be in StartupFiles or Misc.

I have sent it as an attachment with quoted-printables since it has 8
bit characters in it.  However, it should work anyway since the
bindings themselves use the ASCII equivalents with a \M- in front.

Oh yes... remember the bit in the FAQ about using the meta key.

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.

[-- Attachment #2: isobindings.zsh --]
[-- Type: text/plain, Size: 4827 bytes --]

# ISO-8859-1 mappings which work like Emacs' iso-accent-mode.
# This file contains ISO-8859-1 characters itself, which may have
# been encoded for mailing.  However, it should work even if these
# have not been properly decoded, since only ASCII sequences are
# used to define the bindings themselves.
#
# One minor annoyance is that this relies on control-V being bound to
# quoted-insert.  However, it should work in both emacs and vi insert
# mode.
#
# You type the metafied accent character ', `, ", ^, ~ or /, then the
# letter to be accented (only the sensible combinations work; / only
# works naturally with o or O).
#
# Other unexpected combinations:
# \M-~c ç   \M-~C Ç
# \M-~d ð   \M-~D Ð
# \M-"s ß
# \M-/a å   \M-/A Å
# \M-/e æ   \M-/E Æ
# \M-~< «   \M-~> »
# The following are my own additions which are not in the Emacs
# version (some are vaguely TeX-based):
# \M-/# £
# \M-/c ¢
# \M-/m µ
# \M-/p ¶
# \M-/s §
# \M-/t þ
# \M-/y ¥
# \M-/C ©
# \M-/R ®
# \M-`? ¿
# \M-`! ¡
# \M-\^1 ¹
# \M-\^2 ²
# \M-\^3 ³

# Note that \M-' and \M-" are bound to quote-line and quote-region.
# However, if you unbind them you can still use escape-' and escape-"
# for that purpose.  Conversely, the bindings with escape do not give
# accented characters.
bindkey -r '\M-`' '\M-\^' '\M-'\' '\M-"' '\M-~' '\M-/'

# This is the raw binding table, which may be garbled.
# bindkey -s "\M-'a" '^Vá' "\M-'A" '^VÁ' \
# 	     "\M-'e" '^Vé' "\M-'E" '^VÉ' \
# 	     "\M-'i" '^Ví' "\M-'I" '^VÍ' \
# 	     "\M-'o" '^Vó' "\M-'O" '^VÓ' \
# 	     "\M-'u" '^Vú' "\M-'U" '^VÚ' \
# 	     "\M-'y" '^Vý' "\M-'Y" '^VÝ' \
# 	     '\M-`a' '^Và' '\M-`A' '^VÀ' \
# 	     '\M-`e' '^Vè' '\M-`E' '^VÈ' \
# 	     '\M-`i' '^Vì' '\M-`I' '^VÌ' \
# 	     '\M-`o' '^Vò' '\M-`O' '^VÒ' \
# 	     '\M-`u' '^Vù' '\M-`U' '^VÙ' \
# 	     '\M-\^a' '^Vâ' '\M-\^A' '^VÂ' \
# 	     '\M-\^e' '^Vê' '\M-\^E' '^VÊ' \
# 	     '\M-\^i' '^Vî' '\M-\^I' '^VÎ' \
# 	     '\M-\^o' '^Vô' '\M-\^O' '^VÔ' \
# 	     '\M-\^u' '^Vû' '\M-\^U' '^VÛ' \
# 	     '\M-"a' '^Vä' '\M-"A' '^VÄ' \
# 	     '\M-"e' '^Vë' '\M-"E' '^VË' \
# 	     '\M-"i' '^Vï' '\M-"I' '^Vï' \
# 	     '\M-"o' '^Vö' '\M-"O' '^VÖ' \
# 	     '\M-"u' '^Vü' '\M-"U' '^VÜ' \
# 	     '\M-"s' '^Vß' '\M-"y' '^Vÿ' \
# 	     '\M-~a' '^Vã' '\M-~A' '^VÃ' \
# 	     '\M-~c' '^Vç' '\M-~C' '^VÇ' \
# 	     '\M-~d' '^Vð' '\M-~D' '^VÐ' \
# 	     '\M-~n' '^Vñ' '\M-~N' '^VÑ' \
# 	     '\M-~o' '^Võ' '\M-~O' '^VÕ' \
# 	     '\M-~<' '^V«' '\M-~>' '^V»' \
# 	     '\M-~~' '^V¸' \
#            '\M-`?' '^V¿' '\M-`!' '^V¡' \
# 	     '\M-/a' '^Vå' '\M-/A' '^VÅ' \
# 	     '\M-/e' '^Væ' '\M-/E' '^VÆ' \
# 	     '\M-/o' '^Vø' '\M-/O' '^VØ' \
# 	     '\M-//' '^V°' '\M-/#' '^V£' \
#            '\M-/t' '^Vþ' '\M-/c' '^V¢' \
#            '\M-/m' '^Vµ' '\M-/p' '^V¶' \
#            '\M-/s' '^V§' '\M-/y' '^V¥' \
#            '\M-/C' '^V©' '\M-/R' '^V®' \
#            '\M-\^1' '^V¹' '\M-\^2' '^V²' \
#            '\M-\^3' '^V³'

# The following binds the same characters, but using only ASCII sequences.
bindkey -s "\M-'a" '^V\M-a' "\M-'A" '^V\M-A' \
           "\M-'e" '^V\M-i' "\M-'E" '^V\M-I' \
           "\M-'i" '^V\M-m' "\M-'I" '^V\M-M' \
	   "\M-'o" '^V\M-s' "\M-'O" '^V\M-S' \
           "\M-'u" '^V\M-z' "\M-'U" '^V\M-Z' \
           "\M-'y" '^V\M-}' "\M-'Y" '^V\M-]' \
           '\M-`a' '^V\M-`' '\M-`A' '^V\M-@' \
	   '\M-`e' '^V\M-h' '\M-`E' '^V\M-H' \
	   '\M-`i' '^V\M-l' '\M-`I' '^V\M-L' \
	   '\M-`o' '^V\M-r' '\M-`O' '^V\M-R' \
	   '\M-`u' '^V\M-y' '\M-`U' '^V\M-Y' \
           '\M-\^a' '^V\M-b' '\M-\^A' '^V\M-B' \
	   '\M-\^e' '^V\M-j' '\M-\^E' '^V\M-J' \
	   '\M-\^i' '^V\M-n' '\M-\^I' '^V\M-N' \
	   '\M-\^o' '^V\M-t' '\M-\^O' '^V\M-T' \
	   '\M-\^u' '^V\M-{' '\M-\^U' '^V\M-[' \
           '\M-"a' '^V\M-d' '\M-"A' '^V\M-D' \
	   '\M-"e' '^V\M-k' '\M-"E' '^V\M-K' \
	   '\M-"i' '^V\M-o' '\M-"I' '^V\M-O' \
	   '\M-"o' '^V\M-v' '\M-"O' '^V\M-V' \
	   '\M-"u' '^V\M-|' '\M-"U' '^V\M-\\' \
	   '\M-"s' '^V\M-_' '\M-"y' '^V\M-^?' \
           '\M-~a' '^V\M-c' '\M-~A' '^V\M-C' \
	   '\M-~c' '^V\M-g' '\M-~C' '^V\M-G' \
	   '\M-~d' '^V\M-p' '\M-~D' '^V\M-P' \
	   '\M-~n' '^V\M-q' '\M-~N' '^V\M-Q' \
	   '\M-~o' '^V\M-u' '\M-~O' '^V\M-U' \
	   '\M-~<' '^V\M-+' '\M-~>' '^V\M-;' \
	   '\M-~~' '^V\M-8' \
           '\M-`?' '^V\M-?' '\M-`!' '^V\M-!' \
           '\M-/a' '^V\M-e' '\M-/A' '^V\M-E' \
           '\M-/e' '^V\M-f' '\M-/E' '^V\M-F' \
           '\M-/o' '^V\M-x' '\M-/O' '^V\M-X' \
           '\M-//' '^V\M-0' '\M-/#' '^V\M-#' \
           '\M-/t' '^V\M-~' '\M-/c' '^V\M-"' \
           '\M-/m' '^V\M-5' '\M-/p' '^V\M-6' \
           '\M-/s' '^V\M-'\' '\M-/y' '^V\M-%' \
           '\M-/C' '^V\M-)'  '\M-/R' '^V\M-.' \
           '\M-\^1' '^V\M-9' '\M-\^2' '^V\M-2' \
           '\M-\^3' '^V\M-3'

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-07-01 12:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-01 11:59 Key bindings for ISO-8859-1 Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).