/branches/arm/uspace/srv/kbd/arch/arm32/src/scanc.c |
---|
53,7 → 53,7 |
(FUNCTION_KEYS | 6), /* 0x0B - F6 */ |
(FUNCTION_KEYS | 4), /* 0x0C - F4 */ |
'\t', /* 0x0D - Tab */ |
'~', |
'`', |
SPECIAL, /* 0x0F */ |
SPECIAL, /* 0x10 */ |
SPECIAL, /* 0x11 - LAlt */ |
86,15 → 86,15 |
'.', '/', 'l', ';', 'p', '-', |
SPECIAL, /* 0x4F */ |
SPECIAL, /* 0x50 */ |
SPECIAL, /* 0x51 */ |
'\'', |
SPECIAL, /* 0x52 */ |
SPECIAL, /* 0x53 */ |
'{', '=', |
'[', '=', |
SPECIAL, /* 0x56 */ |
SPECIAL, /* 0x57 */ |
SPECIAL, /* 0x58 - Caps Lock */ |
SPECIAL, /* 0x59 - RShift */ |
'\n', '}', |
'\n', ']', |
SPECIAL, /* 0x5C */ |
'\\', |
SPECIAL, /* 0x5E */ |
182,8 → 182,8 |
'>', '?', 'L', ':', 'P', '_', |
SPECIAL, /* 0x4F */ |
SPECIAL, /* 0x50 */ |
SPECIAL, /* 0x51 */ |
'"', |
SPECIAL, /* 0x52 */ |
SPECIAL, /* 0x53 */ |
'{', '+', |
SPECIAL, /* 0x56 */ |
/branches/arm/uspace/srv/kbd/arch/arm32/src/kbd_icp.c |
---|
91,19 → 91,29 |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
static int key_released_flag = 0; |
static uint8_t prev_char = 0xFF; |
static int caps_count = 0; |
int scan_code = IPC_GET_ARG1(*call); |
if (scan_code == 0x58) { |
if (caps_count == 2) { |
caps_count = 0; |
return 1; |
} else if (key_released_flag && !caps_count) { |
key_released_flag = 0; |
return 1; |
} |
caps_count++; |
} |
if (scan_code == PL050_KEY_RELEASE) { |
key_released_flag = 1; |
} else { |
if (key_released_flag && prev_char == scan_code) { |
prev_char = 0xFF; |
if (key_released_flag) { |
key_released(keybuffer, scan_code); |
} else { |
key_pressed(keybuffer, scan_code); |
prev_char = scan_code; |
} |
key_released_flag = 0; |
} |