Bug 5379

Summary: [PATCH] unable to define multimedia keys for laptops
Product: Sisyphus Reporter: cat <akotv>
Component: kbdAssignee: Alexey Gladkov <legion>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: enhancement    
Priority: P5 CC: glebfm, ldv, legion, mike, placeholder
Version: unstable   
Hardware: all   
OS: Linux   
Description Flags
console-tools-setkeycodes-bound.patch none

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 не актуально.