Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/conv.c

    r2391aaf r66d5062  
    3636#include <io/keycode.h>
    3737#include <stdint.h>
    38 #include <stdio.h>
    39 #include <usb/debug.h>
    4038#include "conv.h"
    4139
     
    143141        //[0xe7] = KC_R // TODO: right GUI
    144142       
    145         [0x53] = KC_NUM_LOCK,
    146         [0x54] = KC_NSLASH,
    147         [0x55] = KC_NTIMES,
    148         [0x56] = KC_NMINUS,
    149         [0x57] = KC_NPLUS,
    150         [0x58] = KC_NENTER,
    151         [0x59] = KC_N1,
    152         [0x5a] = KC_N2,
    153         [0x5b] = KC_N3,
    154         [0x5c] = KC_N4,
    155         [0x5d] = KC_N5,
    156         [0x5e] = KC_N6,
    157         [0x5f] = KC_N7,
    158         [0x60] = KC_N8,
    159         [0x61] = KC_N9,
    160         [0x62] = KC_N0,
    161         [0x63] = KC_NPERIOD
    162        
    163143};
    164144
    165 unsigned int usbhid_parse_scancode(int scancode)
     145unsigned int usbkbd_parse_scancode(int scancode)
    166146{
     147//      console_ev_type_t type;
    167148        unsigned int key;
    168149        int *map = scanmap_simple;
    169150        size_t map_length = sizeof(scanmap_simple) / sizeof(int);
     151
     152        /*
     153         * ACK/NAK are returned as response to us sending a command.
     154         * We are not interested in them.
     155         */
     156//      if (scancode == SC_ACK || scancode == SC_NAK)
     157//              return;
     158
     159//      if (scancode == 0xe0) {
     160//              ds = ds_e;
     161//              return;
     162//      }
     163
     164//      switch (ds) {
     165//      case ds_s:
     166//              map = scanmap_simple;
     167//              map_length = sizeof(scanmap_simple) / sizeof(int);
     168//              break;
     169//      case ds_e:
     170//              map = scanmap_e0;
     171//              map_length = sizeof(scanmap_e0) / sizeof(int);
     172//              break;
     173//      default:
     174//              map = NULL;
     175//              map_length = 0;
     176//      }
     177
     178//      ds = ds_s;
     179
     180//      if (scancode & 0x80) {
     181//              scancode &= ~0x80;
     182//              type = KEY_RELEASE;
     183//      } else {
     184//              type = KEY_PRESS;
     185//      }
    170186
    171187        if ((scancode < 0) || ((size_t) scancode >= map_length))
     
    173189
    174190        key = map[scancode];
    175        
     191//      if (key != 0)
     192//              kbd_push_ev(type, key);
    176193        return key;
    177194}
Note: See TracChangeset for help on using the changeset viewer.