Bug 5379 - [PATCH] unable to define multimedia keys for laptops
Summary: [PATCH] unable to define multimedia keys for laptops
Alias: None
Product: Sisyphus
Classification: Development
Component: kbd (show other bugs)
Version: unstable
Hardware: all Linux
: P5 enhancement
Assignee: Alexey Gladkov
QA Contact: qa-sisyphus
Depends on:
Reported: 2004-10-21 23:57 MSD by cat
Modified: 2007-11-28 16:07 MSK (History)
5 users (show)

See Also:

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

Note You need to log in before you can comment on or make changes to this bug.
Description cat 2004-10-21 23:57:36 MSD
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
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 cat 2004-10-21 23:59:43 MSD
Created attachment 612 [details]
Comment 2 Michael Shigorin 2007-11-10 23:30:24 MSK
Пакет есть в 4.0/branch, но в Sisyphus уже orphaned.
Comment 3 Alexey Gladkov 2007-11-11 22:23:45 MSK
Значит на его действующий аналог.
Comment 4 Alexey Gladkov 2007-11-28 16:07:19 MSK
Для kbd 1.13 не актуально.