~ubuntu-branches/ubuntu/trusty/kbd/trusty

« back to all changes in this revision

Viewing changes to debian/patches/dead2.diff

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-02-18 13:25:55 UTC
  • mfrom: (1.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20130218132555-9aiwvswlo12fo32s
Tags: 1.15.5-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Add setfont, kbd_mode, and loadkeys to initramfs for console-setup.
  - Use ckbcomp to get the keyboard layout if other data files are not
    available.
  - Depend on console-setup, and remove config file; we now only support
    systems using console-setup and so it no longer serves a purpose. The
    removed config file for console-screen has changed names from
    /etc/init.d/console-screen.kbd.sh to /etc/init.d/kbd.
  - Change loadkeys to find any console not in raw mode when invoked
    without an explicit console parameter, in case the foreground console
    is in raw mode.
  - Simplify maintainer scripts for conffile removal, using new features
    in debhelper 8.1.0.
  - Add setvtrgb to kbd-udeb.
* Fix incorrect keymap sanity check in loadkeys_ckbcomp.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Samuel Thibault <sthibault@debian.org>
 
2
Subject: Support KT_DEAD2 diacritics
 
3
Forwarded: no
 
4
Bug-Debian: http://bugs.debian.org/694169
 
5
 
 
6
Add support for KT_DEAD2 diacritics to loadkeys and dumpkeys using the
 
7
dead2_ prefix.
 
8
 
 
9
---
 
10
Index: devel/src/dumpkeys.c
 
11
===================================================================
 
12
--- devel.orig/src/dumpkeys.c   2013-02-16 17:21:51.000000000 +0100
 
13
+++ devel/src/dumpkeys.c        2013-02-16 17:21:51.000000000 +0100
 
14
@@ -153,6 +153,9 @@
 
15
        else if (!numeric && t == KT_META && v < 128 && v < syms[0].size &&
 
16
                 (p = syms[0].table[v])[0])
 
17
                printf("Meta_%-11s", p);
 
18
+       else if (!numeric && t == KT_DEAD2 && v < 256 && v < syms[0].size &&
 
19
+                (p = syms[0].table[v])[0])
 
20
+               printf("dead2_%-10s", p);
 
21
        else
 
22
                printf("0x%04x         %s", code, plus ? "" : " ");
 
23
 }
 
24
Index: devel/src/ksyms.c
 
25
===================================================================
 
26
--- devel.orig/src/ksyms.c      2013-02-16 17:21:51.000000000 +0100
 
27
+++ devel/src/ksyms.c   2013-02-16 17:21:51.000000000 +0100
 
28
@@ -1788,6 +1788,14 @@
 
29
                /* fall through to error printf */
 
30
        }
 
31
 
 
32
+       if (!strncmp(s, "dead2_", 6)) {
 
33
+               keycode = ksymtocode(s+6, TO_8BIT);
 
34
+               if (KTYP(keycode) == KT_LATIN)
 
35
+                       return K(KT_DEAD2, KVAL(keycode));
 
36
+
 
37
+               /* fall through to error printf */
 
38
+       }
 
39
+
 
40
        for (i = 0; i < syms_size; i++) {
 
41
                jmax = ((i == 0 && direction == TO_UNICODE) ? 128 : syms[i].size);
 
42
                for (j = 0; j < jmax; j++)