[Trac #413] Scancodes for game keys need immediate updating.

Zarro Boogs per Child bugtracker at laptop.org
Sun Nov 12 03:37:20 EST 2006


#413: Scancodes for game keys need immediate updating.
---------------------+------------------------------------------------------
 Reporter:  cjb      |        Owner:  warp   
     Type:  defect   |       Status:  new    
 Priority:  blocker  |    Milestone:  BTest-1
Component:  distro   |   Resolution:         
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by dwmw2):

 If I understand correctly then it should look something like this...

 {{{
 --- setolpckeys.c~      2006-11-11 14:49:16.000000000 +0800
 +++ setolpckeys.c       2006-11-12 16:19:15.000000000 +0800
 @@ -100,5 +100,18 @@ main (int argc, char *argv[])
      /* FIXME: Right grab seems to be releasing on a different scancode.
 */
      ret -= set_keycode(fd, 0x85, KEY_RIGHTMETA);

 +    /* Set up game keys to map to up/down/left/right for now */
 +    ret -= set_keycode(fd, 0x65, KEY_UP);
 +    ret -= set_keycode(fd, 0x66, KEY_DOWN);
 +    ret -= set_keycode(fd, 0x67, KEY_LEFT);
 +    ret -= set_keycode(fd, 0x68, KEY_RIGHT);
 +
 +    ret -= set_keycode(fd, 0x65 | 0x80, KEY_UP);
 +    ret -= set_keycode(fd, 0x66 | 0x80, KEY_DOWN);
 +    ret -= set_keycode(fd, 0x67 | 0x80, KEY_LEFT);
 +    ret -= set_keycode(fd, 0x68 | 0x80, KEY_RIGHT);
 +
 +    ret -= set_keycode(fd, 0x69, KEY_SWITCHVIDEOMODE);
 +
      exit(ret);
  }
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/413#comment:1>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list