Changeset 11797d5 in mainline


Ignore:
Timestamp:
2011-01-21T16:37:26Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3ee48f2, 9097c16a
Parents:
7d540c8
Message:

Fixes + layouts

  • Fixed scancode → keycode map.
  • Removed copied layout file, layouts are now symlinked from generic kbd driver
  • Layout settings in kbd driver
Location:
uspace/drv/usbkbd
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbkbd/Makefile

    r7d540c8 r11797d5  
    2929USPACE_PREFIX = ../..
    3030LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBUSB_PREFIX)/libusb.a
    31 EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include
     31EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include -I.
    3232BINARY = usbkbd
     33SRV_KBD = $(USPACE_PREFIX)/srv/hid/kbd
    3334
    3435SOURCES = \
     
    3738        descdump.c \
    3839        conv.c \
    39         us_qwerty.c
     40        us_qwerty.c \
     41        us_dvorak.c \
     42        cz.c
    4043
    4144include $(USPACE_PREFIX)/Makefile.common
     45
     46us_qwerty.c:
     47        ln -snf $(SRV_KBD)/layout/$@ $@
     48
     49us_dvorak.c:
     50        ln -snf $(SRV_KBD)/layout/$@ $@
     51
     52cz.c:
     53        ln -snf $(SRV_KBD)/layout/$@ $@
     54
     55
  • uspace/drv/usbkbd/conv.c

    r7d540c8 r11797d5  
    3030#include "conv.h"
    3131
    32 static int scanmap_simple[] = {
     32static int scanmap_simple[255] = {
    3333
    3434//      [0x29] = KC_BACKTICK,
     
    5656        [0x16] = KC_S,
    5757        [0x17] = KC_T,
    58         [0x12] = KC_U,
     58        [0x18] = KC_U,
    5959        [0x19] = KC_V,
    6060        [0x1a] = KC_W,
  • uspace/drv/usbkbd/main.c

    r7d540c8 r11797d5  
    134134};
    135135
    136 // TODO: put to device?
    137136static int active_layout = 0;
    138137
     
    189188        printf("keycode: %u\n", key);
    190189*/
    191         /*
     190       
    192191        if (type == KEY_PRESS && (mods & KM_LCTRL) &&
    193192                key == KC_F1) {
     
    210209                return;
    211210        }
    212         */
     211       
    213212        ev.type = type;
    214213        ev.key = key;
     
    236235 */
    237236static void usbkbd_process_keycodes(const uint8_t *key_codes, size_t count,
    238                                     uint8_t modifiers, void *arg)
     237    uint8_t modifiers, void *arg)
    239238{
    240239        printf("Got keys: ");
Note: See TracChangeset for help on using the changeset viewer.