Package: rxvt-unicode
Version: 9.02-1
Severity: normal
rxvt's sequences for modifed function keys are non-standard,
non-extensible, and break ECMA-48.
Such key as <Del> is encoded CSI 3 ~. This is fine. This is the
accepted "private" CSI for function keys, with P1 = 3 to mean "Delete".
<Ctrl-Del> and <Shift-Ctrl-Del> are encoded respectively as CSI 3 ^ and
CSI 3 @. The latter, CSI @, is the CSI used for "Insert Character" where
Pn gives a count. CSI ^ is given in ECMA-48 as "SIMD - Select Implicit
Movement Direction", and controls the implicit direction of cursor
movement during normal printing; Ps=0 for LTR or Ps=1 for RTL.
The sequence for <Shift-Del> is CSI 3 $ which is an invalid CSI sequence
on its own - the dollar sign, ASCII 0x24, indicates an "intermediate byte".
The CSI continues until the first byte in the range 0x40-0x7f. rxvt
fails to provide one.
This scheme of seemingly-randomly chosen "variants" of CSI is also hard
to extend - how do you encode Alt/Meta/Super/Hyper.
Instead, I would suggest to use the scheme that other terminals are
using to do this; which is to use the second CSI positional argument to
encode the modifier state. Give the modifiers each a bitmask - Shift 1,
Alt 2, Control 4, and so on, and use this bitmask + 1 as the P2
parameter. (The 1 is added so that the default state of no modifiers
retains the "default" value of 1).
<Del> CSI 3;1~
<Shift-Del> CSI 3;2~
<Alt-Del> CSI 3;3~
<Shift-Alt-Del> CSI 3;4~
<Ctrl-Del> CSI 3;5~
<Shift-Ctrl-Del> CSI 3;6~
<Alt-Ctrl-Del> CSI 3;7~ (If you can type this without
rebooting ;)
<Shift-Alt-Ctrl-Del> CSI 3;8~
This can be easily extended in general, without regard to how to extend
a parser.
xterm has used this scheme for many years; other terminals
(xfce4-terminal and gnome-terminal, being based on libvte) are adapting
it. Applications are gaining support for it - three I can name offhand
being tinyfugue, vim and irssi, all having native understanding of this
modifier notation.
It applies generically - anything CSI-encoded can be given these
modifiers. For example, the arrow keys
<Up> CSI 1;1A
<Shift-Up> CSI 1;3A
<Alt-Up> CSI 1;4A
...
If rxvt adopted this scheme instead of its own custom format, then
applications would be able to cope with generic modified function keys
much easier.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.24.2.nim
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages rxvt-unicode depends on:
ii base-passwd 3.5.17 Debian base system master password
ii libafterimage0 2.2.7-2 imaging library designed for After
ii libc6 2.7-6 GNU C Library: Shared libraries
ii libfontconfig1 2.5.0-2 generic font configuration library
ii libfreetype6 2.3.5-1+b1 FreeType 2 font engine, shared lib
ii libgcc1 1:4.3-20080202-1 GCC support library
ii libglib2.0-0 2.14.6-1 The GLib library of C routines
ii libgtk2.0-0 2.12.5-2 The GTK+ graphical user interface
ii libice6 2:1.0.4-1 X11 Inter-Client Exchange library
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libperl5.8 5.8.8-12 Shared Perl library
ii libpng12-0 1.2.15~beta5-3 PNG library - runtime
ii librsvg2-2 2.20.0-1 SAX-based renderer library for SVG
ii libsm6 2:1.0.3-1+b1 X11 Session Management library
ii libtiff4 3.8.2-7 Tag Image File Format (TIFF) libra
ii libungif4g 4.1.6-3 library for GIF images (transition
ii libx11-6 2:1.0.3-7 X11 client-side library
ii libxext6 1:1.0.3-2 X11 miscellaneous extension librar
ii libxft2 2.1.12-2 FreeType-based font drawing librar
ii libxrender1 1:0.9.4-1 X Rendering Extension client libra
ii ncurses-base 5.6+20080203-1 Descriptions of common terminal ty
ii zlib1g 1:1.2.3.3.dfsg-11 compression library - runtime
rxvt-unicode recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]