Changeset dd641e3 in mainline for kbd/arch/ia32/src/kbd.c


Ignore:
Timestamp:
2006-06-04T12:22:54Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
26f48570
Parents:
67ec84b
Message:

fb make changes neaded by ega driver and console switching by function keys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kbd/arch/ia32/src/kbd.c

    r67ec84b rdd641e3  
    5858#define SC_END          0x4f
    5959
     60#define FUNCTION_KEYS 0x100
     61
    6062static volatile int keyflags;           /**< Tracking of multiple keypresses. */
    6163static volatile int lockflags;          /**< Tracking of multiple keys lockings. */
    6264
    6365/** Primary meaning of scancodes. */
    64 static char sc_primary_map[] = {
     66static int sc_primary_map[] = {
    6567        SPECIAL, /* 0x00 */
    6668        SPECIAL, /* 0x01 - Esc */
     
    7981        ' ',
    8082        SPECIAL, /* 0x3a - CapsLock */
    81         SPECIAL, /* 0x3b - F1 */
    82         SPECIAL, /* 0x3c - F2 */
    83         SPECIAL, /* 0x3d - F3 */
    84         SPECIAL, /* 0x3e - F4 */
    85         SPECIAL, /* 0x3f - F5 */
    86         SPECIAL, /* 0x40 - F6 */
    87         SPECIAL, /* 0x41 - F7 */
    88         SPECIAL, /* 0x42 - F8 */
    89         SPECIAL, /* 0x43 - F9 */
    90         SPECIAL, /* 0x44 - F10 */
     83        (FUNCTION_KEYS | 1), /* 0x3b - F1 */
     84        (FUNCTION_KEYS | 2), /* 0x3c - F2 */
     85        (FUNCTION_KEYS | 3), /* 0x3d - F3 */
     86        (FUNCTION_KEYS | 4), /* 0x3e - F4 */
     87        (FUNCTION_KEYS | 5), /* 0x3f - F5 */
     88        (FUNCTION_KEYS | 6), /* 0x40 - F6 */
     89        (FUNCTION_KEYS | 7), /* 0x41 - F7 */
     90        (FUNCTION_KEYS | 8), /* 0x42 - F8 */
     91        (FUNCTION_KEYS | 9), /* 0x43 - F9 */
     92        (FUNCTION_KEYS | 10), /* 0x44 - F10 */
    9193        SPECIAL, /* 0x45 - NumLock */
    9294        SPECIAL, /* 0x46 - ScrollLock */
     
    98100        SPECIAL, /* 0x55 - F11/F12/PF1/FN */
    99101        SPECIAL, /* 0x56 - unlabelled key next to LAlt */
    100         SPECIAL, /* 0x57 - F11 */
    101         SPECIAL, /* 0x58 - F12 */
     102        FUNCTION_KEYS | 11, /* 0x57 - F11 */
     103        FUNCTION_KEYS | 12, /* 0x58 - F12 */
    102104        SPECIAL, /* 0x59 */
    103105        SPECIAL, /* 0x5a */
     
    251253static int key_pressed(keybuffer_t *keybuffer, unsigned char key)
    252254{
    253         char *map = sc_primary_map;
    254         char ascii = sc_primary_map[key];
    255         char shift, capslock;
    256         char letter = 0;
     255        int *map = sc_primary_map;
     256        int ascii = sc_primary_map[key];
     257        int shift, capslock;
     258        int letter = 0;
    257259
    258260        switch (key) {
Note: See TracChangeset for help on using the changeset viewer.