-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: fa242f5c6737c87ad47da19080eea78f0dfd7bd9: path_to: revision_to:
commit fa242f5c6737c87ad47da19080eea78f0dfd7bd9 Author: Marc Lehmann <schmorp@schmorp.de> Date: Fri Apr 22 02:09:39 2005 +0000 *** empty log message *** diff --git a/Changes b/Changes
--- a/Changes +++ b/Changes @@ -11,6 +11,11 @@ WISH: OnTheSpot editing, or maybe switch to miiiiiiif WISH: tabbed windows (hey, just use screen...) WISH: just for fun, do shade and tint with XRender. +5.5 + - re-enabled modifer state matching as in 5.3, but implement + a new builtin: keysym style that simply reverts to the built-in + meaning of the given key. + 5.4 Mon Apr 18 00:33:31 CEST 2005 - match modifier state exactly in custom keyboard code. this is necessary because it has no knowledge about diff --git a/doc/rxvt.1.html b/doc/rxvt.1.html
--- a/doc/rxvt.1.html +++ b/doc/rxvt.1.html @@ -49,7 +49,7 @@ </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> -<p><strong>rxvt-unicode</strong>, version <strong>5.3</strong>, is a colour vt102 terminal +<p><strong>rxvt-unicode</strong>, version <strong>5.5</strong>, is a colour vt102 terminal emulator intended as an <em>xterm</em>(1) replacement for users who do not require features such as Tektronix 4014 emulation and toolkit-style configurability. As a result, <strong>rxvt-unicode</strong> uses much less swap space -- @@ -1285,6 +1285,30 @@ when Control-Meta-c is being pressed'':</p> URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007</pre> </dd> <dd> +<p>Due the the large number of modifier combinations, a defined key mapping +will match if at <em>at least</em> the specified identifiers are being set, and +no other key mappings with those and more bits are being defined. That +means that defining a key map for <code>a</code> will automatically provide +definitions for <code>Meta-a</code>, <code>Shift-a</code> and so on, unless some of those are defined +mappings themselves.</p> +</dd> +<dd> +<p>Unfortunately, this will override built-in key mappings. For example +if you overwrite the <code>Insert</code> key you will disable rxvt's +<code>Shift-Insert</code> mapping. To re-enable that, you can poke ``holes'' into the +user-defined keymap using the <code>builtin:</code> replacement:</p> +</dd> +<dd> +<pre> + URxvt.keysym.Insert: <my insert key sequence> + URxvt.keysym.S-Insert: builtin:</pre> +</dd> +<dd> +<p>The first line defines a mapping for <code>Insert</code> and <em>any</em> combination +of modifiers. The second line re-establishes the default mapping for +<code>Shift-Insert</code>.</p> +</dd> +<dd> <p>The following example will map Control-Meta-1 and Control-Meta-2 to the fonts <code>suxuseuro</code> and <code>9x15bold</code>, so you can have some limited font-switching at runtime:</p> diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in
--- a/doc/rxvt.1.man.in +++ b/doc/rxvt.1.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 1" -.TH rxvt 1 "2005-04-17" "5.3" "RXVT-UNICODE" +.TH rxvt 1 "2005-04-22" "5.5" "RXVT-UNICODE" .SH "NAME" rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system) .SH "SYNOPSIS" @@ -980,6 +980,27 @@ when Control-Meta-c is being pressed": \& URxvt.keysym.M-C-c: command:\e033]701;zh_CN.GBK\e007 .Ve .Sp +Due the the large number of modifier combinations, a defined key mapping +will match if at \fIat least\fR the specified identifiers are being set, and +no other key mappings with those and more bits are being defined. That +means that defining a key map for \f(CW\*(C`a\*(C'\fR will automatically provide +definitions for \f(CW\*(C`Meta\-a\*(C'\fR, \f(CW\*(C`Shift\-a\*(C'\fR and so on, unless some of those are defined +mappings themselves. +.Sp +Unfortunately, this will override built-in key mappings. For example +if you overwrite the \f(CW\*(C`Insert\*(C'\fR key you will disable @@RXVT_NAME@@'s +\&\f(CW\*(C`Shift\-Insert\*(C'\fR mapping. To re-enable that, you can poke \*(L"holes\*(R" into the +user-defined keymap using the \f(CW\*(C`builtin:\*(C'\fR replacement: +.Sp +.Vb 2 +\& URxvt.keysym.Insert: <my insert key sequence> +\& URxvt.keysym.S-Insert: builtin: +.Ve +.Sp +The first line defines a mapping for \f(CW\*(C`Insert\*(C'\fR and \fIany\fR combination +of modifiers. The second line re-establishes the default mapping for +\&\f(CW\*(C`Shift\-Insert\*(C'\fR. +.Sp The following example will map Control\-Meta\-1 and Control\-Meta\-2 to the fonts \f(CW\*(C`suxuseuro\*(C'\fR and \f(CW\*(C`9x15bold\*(C'\fR, so you can have some limited font-switching at runtime: diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod
--- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -960,6 +960,25 @@ when Control-Meta-c is being pressed": URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007 +Due the the large number of modifier combinations, a defined key mapping +will match if at I<at least> the specified identifiers are being set, and +no other key mappings with those and more bits are being defined. That +means that defining a key map for C<a> will automatically provide +definitions for C<Meta-a>, C<Shift-a> and so on, unless some of those are defined +mappings themselves. + +Unfortunately, this will override built-in key mappings. For example +if you overwrite the C<Insert> key you will disable @@RXVT_NAME@@'s +C<Shift-Insert> mapping. To re-enable that, you can poke "holes" into the +user-defined keymap using the C<builtin:> replacement: + + URxvt.keysym.Insert: <my insert key sequence> + URxvt.keysym.S-Insert: builtin: + +The first line defines a mapping for C<Insert> and I<any> combination +of modifiers. The second line re-establishes the default mapping for +C<Shift-Insert>. + The following example will map Control-Meta-1 and Control-Meta-2 to the fonts C<suxuseuro> and C<9x15bold>, so you can have some limited font-switching at runtime: diff --git a/doc/rxvt.1.txt b/doc/rxvt.1.txt
--- a/doc/rxvt.1.txt +++ b/doc/rxvt.1.txt @@ -6,7 +6,7 @@ SYNOPSIS rxvt [options] [-e command [ args ]] DESCRIPTION - rxvt-unicode, version 5.3, is a colour vt102 terminal emulator intended + rxvt-unicode, version 5.5, is a colour vt102 terminal emulator intended as an *xterm*(1) replacement for users who do not require features such as Tektronix 4014 emulation and toolkit-style configurability. As a result, rxvt-unicode uses much less swap space -- a significant @@ -827,6 +827,25 @@ RESOURCES (available also as long-options) URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007 + Due the the large number of modifier combinations, a defined key + mapping will match if at *at least* the specified identifiers are + being set, and no other key mappings with those and more bits are + being defined. That means that defining a key map for "a" will + automatically provide definitions for "Meta-a", "Shift-a" and so on, + unless some of those are defined mappings themselves. + + Unfortunately, this will override built-in key mappings. For example + if you overwrite the "Insert" key you will disable rxvt's + "Shift-Insert" mapping. To re-enable that, you can poke "holes" into + the user-defined keymap using the "builtin:" replacement: + + URxvt.keysym.Insert: <my insert key sequence> + URxvt.keysym.S-Insert: builtin: + + The first line defines a mapping for "Insert" and *any* combination + of modifiers. The second line re-establishes the default mapping for + "Shift-Insert". + The following example will map Control-Meta-1 and Control-Meta-2 to the fonts "suxuseuro" and "9x15bold", so you can have some limited font-switching at runtime: diff --git a/src/keyboard.C b/src/keyboard.C
--- a/src/keyboard.C +++ b/src/keyboard.C @@ -217,6 +217,8 @@ keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, else rxvt_warn ("cannot parse list-type keysym '%s', treating as normal keysym.\n", translation); } + else if (strncmp (translation, "builtin:", 8) == 0) + key->type = keysym_t::BUILTIN; user_keymap.push_back (key); user_translations.push_back (translation); @@ -277,64 +279,67 @@ keyboard_manager::dispatch (rxvt_term *term, KeySym keysym, unsigned int state) { const keysym_t &key = *keymap [index]; - int keysym_offset = keysym - key.keysym; - - wchar_t *wc = rxvt_utf8towcs (key.str); - char *str = rxvt_wcstombs (wc); - // TODO: do (some) translations, unescaping etc, here (allow \u escape etc.) - free (wc); - - switch (key.type) + if (key.type != keysym_t::BUILTIN) { - case keysym_t::NORMAL: - output_string (term, str); - break; + int keysym_offset = keysym - key.keysym; + + wchar_t *wc = rxvt_utf8towcs (key.str); + char *str = rxvt_wcstombs (wc); + // TODO: do (some) translations, unescaping etc, here (allow \u escape etc.) + free (wc); - case keysym_t::RANGE: + switch (key.type) { - char buf[STRING_MAX]; + case keysym_t::NORMAL: + output_string (term, str); + break; - if (format_keyrange_string (str, keysym_offset, buf, sizeof (buf)) > 0) - output_string (term, buf); - } - break; + case keysym_t::RANGE: + { + char buf[STRING_MAX]; - case keysym_t::RANGE_META8: - { - int len; - char buf[STRING_MAX]; + if (format_keyrange_string (str, keysym_offset, buf, sizeof (buf)) > 0) + output_string (term, buf); + } + break; - len = format_keyrange_string (str, keysym_offset, buf, sizeof (buf)); - if (len > 0) - output_string_meta8 (term, state, buf, len); - } - break; + case keysym_t::RANGE_META8: + { + int len; + char buf[STRING_MAX]; - case keysym_t::LIST: - { - char buf[STRING_MAX]; + len = format_keyrange_string (str, keysym_offset, buf, sizeof (buf)); + if (len > 0) + output_string_meta8 (term, state, buf, len); + } + break; + + case keysym_t::LIST: + { + char buf[STRING_MAX]; - char *prefix, *middle, *suffix; + char *prefix, *middle, *suffix; - prefix = str; - middle = strchr (prefix + 1, *prefix); - suffix = strrchr (middle + 1, *prefix); + prefix = str; + middle = strchr (prefix + 1, *prefix); + suffix = strrchr (middle + 1, *prefix); - memcpy (buf, prefix + 1, middle - prefix - 1); - buf [middle - prefix - 1] = middle [keysym_offset + 1]; - strcpy (buf + (middle - prefix), suffix + 1); + memcpy (buf, prefix + 1, middle - prefix - 1); + buf [middle - prefix - 1] = middle [keysym_offset + 1]; + strcpy (buf + (middle - prefix), suffix + 1); - output_string (term, buf); + output_string (term, buf); + } + break; } - break; - } - free (str); + free (str); - return true; + return true; + } } - else - return false; + + return false; } // purge duplicate keymap entries @@ -461,13 +466,8 @@ keyboard_manager::find_keysym (KeySym keysym, unsigned int state) keysym_t *key = keymap [index]; if (key->keysym <= keysym && keysym < key->keysym + key->range -#if 0 // disabled because the custom ekymap does not know the builtin keymap // match only the specified bits in state and ignore others - && (key->state & state) == key->state -#else // re-enable this part once the builtin keymap is handled here, too - && key->state == state -#endif - ) + && (key->state & state) == key->state) return index; } diff --git a/src/keyboard.h b/src/keyboard.h
--- a/src/keyboard.h +++ b/src/keyboard.h @@ -34,7 +34,7 @@ typedef void (keyevent_handler) (rxvt_term *rt, struct keysym_t { enum keysym_type { - NORMAL, RANGE, RANGE_META8, LIST + NORMAL, RANGE, RANGE_META8, LIST, BUILTIN, }; KeySym keysym; diff --git a/src/version.h b/src/version.h
--- a/src/version.h +++ b/src/version.h @@ -1,3 +1,3 @@ // VERSION _must_ be \d.\d+ -#define VERSION "5.4" +#define VERSION "5.5" #define DATE "2005-04-18"
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 12:36:30 2024