diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-09 19:13:25 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-09 19:13:25 +0200 |
commit | 93bdd69afb58595b3c904e422f856f6bab987e6f (patch) | |
tree | aca9da250b76ade7e0ce72d641bef9655344bb7e /debian/patches/0005-i386-remap-some-keys.patch | |
parent | 844cba0578fba1a430ee70beb2081684e836877c (diff) |
add patch series
Diffstat (limited to 'debian/patches/0005-i386-remap-some-keys.patch')
-rw-r--r-- | debian/patches/0005-i386-remap-some-keys.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/debian/patches/0005-i386-remap-some-keys.patch b/debian/patches/0005-i386-remap-some-keys.patch new file mode 100644 index 0000000..1e91129 --- /dev/null +++ b/debian/patches/0005-i386-remap-some-keys.patch @@ -0,0 +1,60 @@ +From e8839c0aacf6c389302d21a32c14a28c8beeac4f Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Mon, 9 Jun 2014 18:15:47 +0200 +Subject: [PATCH 5/6] i386: remap some keys + +As a convenience for the nice people using our debugger, remap some +keys to the readline-like shortcuts supported by dde. + +* i386/i386at/kd.c (kdcnmaygetc): Remap some keys. +--- + i386/i386at/kd.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c +index 5371fb2..7339767 100644 +--- a/i386/i386at/kd.c ++++ b/i386/i386at/kd.c +@@ -3029,6 +3029,39 @@ kdcnmaygetc(void) + #ifdef notdef + cnsetleds(state2leds(kd_state)); + #endif ++ } else if (! up ++ && c == K_ESC ++ && key_map[scancode][char_idx+1] == 0x5b) { ++ /* As a convenience for the nice ++ people using our debugger, remap ++ some keys to the readline-like ++ shortcuts supported by dde. ++ ++ XXX This is a workaround for the ++ limited kernel getchar interface. ++ It is only used by the debugger. */ ++ c = key_map[scancode][char_idx+2]; ++ switch (c) { ++#define _MAP(A,B,C) (C) ++#define MAP(T) _MAP(T) ++#define CTRL(c) ((c) & 0x1f) ++ case MAP(K_HOME): c = CTRL('a'); break; ++ case MAP(K_UA): c = CTRL('p'); break; ++ case MAP(K_LA): c = CTRL('b'); break; ++ case MAP(K_RA): c = CTRL('f'); break; ++ case MAP(K_DA): c = CTRL('n'); break; ++ case MAP(K_END): c = CTRL('e'); break; ++ /* delete */ ++ case 0x39: c = CTRL('d'); break; ++#undef CTRL ++#undef MAP ++#undef _MAP ++ default: ++ /* Retain the old behavior. */ ++ c = K_ESC; ++ } ++ ++ return(c); + } else if (!up) { + /* regular key-down */ + if (c == K_CR) +-- +2.0.0 + |