Bug 5379 - [PATCH] unable to define multimedia keys for laptops
: [PATCH] unable to define multimedia keys for laptops
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/kbd)
: unstable
: all Linux
: P5 enhancement
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2004-10-21 23:57 by
Modified: 2007-11-28 16:07 (History)


Attachments
console-tools-setkeycodes-bound.patch (399 bytes, patch)
2004-10-21 23:59, cat
no flags Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-10-21 23:57:36
When I use setkeycodes command with the goal to define multimedia keys given
utility complains about keycode bound violation. As far as I know ioctl data
type for scancode is an int thus it should be possible to add keycodes which are
bigger than one byte length (it is feasible at least for 2.6 kernel). The
solution can be as following (it works for me on compaq evo n410c):

--- console-tools-0.2.3/kbdtools/setkeycodes.c.orig     2004-10-21 20:37:08 +0300
+++ console-tools-0.2.3/kbdtools/setkeycodes.c  2004-10-21 20:38:25 +0300
@@ -75,7 +75,7 @@
          a.scancode -= 0xe000;
          a.scancode += 128;
        }
-      if (a.scancode > 255 || a.keycode > 127)
+      if (a.scancode > 255 || a.keycode > 255)
        badusage(_("code outside bounds"));
       if (ioctl(fd,KDSETKEYCODE,&a)) 
        {

Steps to Reproduce:
1. setkeycodes e023 163
2.
3.
Actual Results:  
[root@pc219b root]# setkeycodes e023 163
setkeycodes: code outside bounds
Usage: setkeycodes [options] scancode keycode ...
 (where scancode is either xx or e0xx, given in hexadecimal,
  and keycode is given in decimal)
valid options are:
        -h --help         display this help text and exit
        -V --version      display version information and exit

Expected Results:  
no output on success
------- Comment #1 From 2004-10-21 23:59:43 -------
Created an attachment (id=612) [details]
console-tools-setkeycodes-bound.patch
------- Comment #2 From 2007-11-10 23:30:24 -------
Пакет есть в 4.0/branch, но в Sisyphus уже orphaned.
------- Comment #3 From 2007-11-11 22:23:45 -------
Значит на его действующий аналог.
------- Comment #4 From 2007-11-28 16:07:19 -------
Для kbd 1.13 не актуально.