Changeset 90e3d6a in mainline for uspace/srv/kbd/layout/us_qwerty.c


Ignore:
Timestamp:
2009-02-20T21:01:17Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12b6796
Parents:
c9b550b
Message:

e0-prefixed pc scancodes. Num Lock and numeric keyboard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/kbd/layout/us_qwerty.c

    rc9b550b r90e3d6a  
    161161        [KC_TAB] = '\t',
    162162        [KC_ENTER] = '\n',
    163         [KC_SPACE] = ' '
     163        [KC_SPACE] = ' ',
     164
     165        [KC_NSLASH] = '/',
     166        [KC_NTIMES] = '*',
     167        [KC_NMINUS] = '-',
     168        [KC_NPLUS] = '+',
     169        [KC_NENTER] = '\n'
     170};
     171
     172static char map_numeric[] = {
     173        [KC_N7] = '7',
     174        [KC_N8] = '8',
     175        [KC_N9] = '9',
     176        [KC_N4] = '4',
     177        [KC_N5] = '5',
     178        [KC_N6] = '6',
     179        [KC_N1] = '1',
     180        [KC_N2] = '2',
     181        [KC_N3] = '3',
     182
     183        [KC_N0] = '0',
     184        [KC_NPERIOD] = '.'
    164185};
    165186
     
    193214                c = translate(ev->key, map_not_shifted, sizeof(map_not_shifted) / sizeof(char));
    194215
    195         if (c != 0 ) return c;
    196 
     216        if (c != 0) return c;
     217
     218        if ((ev->mods & KM_NUM_LOCK) != 0)
     219                c = translate(ev->key, map_numeric, sizeof(map_numeric) / sizeof(char));
     220        else
     221                c = 0;
     222
     223        return c;
    197224}
    198225
Note: See TracChangeset for help on using the changeset viewer.