[Pkg-kbd-devel] Bug#694169: kbd: Add support for dead2

Samuel Thibault sthibault at debian.org
Sat Nov 24 14:54:54 UTC 2012


Package: kbd
Version: 1.15.3-9
Severity: normal
Tags: patch

Hello,

kbd currently has no support for the KT_DEAD2 keysyms. The attached
patch adds it by simply using a dead2_ prefix (just like KT_DEAD keysyms
use the dead_ prefix).

(Yes, a different prefix is needed, because dead_acute is very different
from dead2_acute, dead_acute is actually dead2_apostrophe).

Samuel

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.0.4 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages kbd depends on:
ii  libc6     2.13-35
ii  lsb-base  4.1+Debian8

Versions of packages kbd recommends:
ii  console-data   2:1.12-2
ii  console-setup  1.87

kbd suggests no packages.

-- no debconf information
-------------- next part --------------
diff -ur kbd-1.15.3-orig/src/dumpkeys.c kbd-1.15.3/src/dumpkeys.c
--- kbd-1.15.3-orig/src/dumpkeys.c	2011-04-26 22:29:35.000000000 +0200
+++ kbd-1.15.3/src/dumpkeys.c	2012-11-24 15:52:01.979514481 +0100
@@ -153,6 +153,9 @@
 	else if (!numeric && t == KT_META && v < 128 && v < syms[0].size &&
 		 (p = syms[0].table[v])[0])
 		printf("Meta_%-11s", p);
+	else if (!numeric && t == KT_DEAD2 && v < 256 && v < syms[0].size &&
+		 (p = syms[0].table[v])[0])
+		printf("dead2_%-10s", p);
 	else
 		printf("0x%04x         %s", code, plus ? "" : " ");
 }
diff -ur kbd-1.15.3-orig/src/ksyms.c kbd-1.15.3/src/ksyms.c
--- kbd-1.15.3-orig/src/ksyms.c	2011-04-26 22:29:35.000000000 +0200
+++ kbd-1.15.3/src/ksyms.c	2012-11-24 15:51:37.859997948 +0100
@@ -1788,6 +1788,14 @@
 		/* fall through to error printf */
 	}
 
+	if (!strncmp(s, "dead2_", 6)) {
+		keycode = ksymtocode(s+6, TO_8BIT);
+		if (KTYP(keycode) == KT_LATIN)
+			return K(KT_DEAD2, KVAL(keycode));
+
+		/* fall through to error printf */
+	}
+
 	for (i = 0; i < syms_size; i++) {
 		jmax = ((i == 0 && direction == TO_UNICODE) ? 128 : syms[i].size);
 		for (j = 0; j < jmax; j++)


More information about the Pkg-kbd-devel mailing list