atkbd(4): Fix "hancha" and "han/yong" korean keys handling.
The Korean keyboard has two keys, the Korean/Chinese and the Korean/English toggles, that generate scancodes 0xF1 and 0xF2 (respectively) when pressed, and nothing when released. They do not repeat. As Hanyong/Hancha keys are generally greater than 0x80, which is generally considered a release key, add extra preceding press key event to generate press/release pair. Swap Hanyong/Hancha key codes to match reality. Reported by: Warioburn <warioburn@yahoo.co.jp> PR: 265260 MFC after: 1 week
This commit is contained in:
parent
5b741298b1
commit
6a26c99f82
@ -684,6 +684,16 @@ atkbd_read_char(keyboard_t *kbd, int wait)
|
||||
#ifdef EVDEV_SUPPORT
|
||||
/* push evdev event */
|
||||
if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && state->ks_evdev != NULL) {
|
||||
/* "hancha" and "han/yong" korean keys handling */
|
||||
if (state->ks_evdev_state == 0 &&
|
||||
(scancode == 0xF1 || scancode == 0xF2)) {
|
||||
keycode = evdev_scancode2key(&state->ks_evdev_state,
|
||||
scancode & 0x7F);
|
||||
evdev_push_event(state->ks_evdev, EV_KEY,
|
||||
(uint16_t)keycode, 1);
|
||||
evdev_sync(state->ks_evdev);
|
||||
}
|
||||
|
||||
keycode = evdev_scancode2key(&state->ks_evdev_state,
|
||||
scancode);
|
||||
|
||||
|
@ -147,7 +147,7 @@ static uint16_t evdev_at_set1_scancodes[] = {
|
||||
NONE, NONE, NONE, NONE,
|
||||
NONE, NONE, NONE, NONE,
|
||||
NONE, NONE, NONE, NONE,
|
||||
KEY_KATAKANAHIRAGANA, KEY_HANGEUL, KEY_HANJA, KEY_RO,
|
||||
KEY_KATAKANAHIRAGANA, KEY_HANJA, KEY_HANGEUL, KEY_RO,
|
||||
NONE, NONE, KEY_ZENKAKUHANKAKU, KEY_HIRAGANA,
|
||||
KEY_KATAKANA, KEY_HENKAN, NONE, KEY_MUHENKAN,
|
||||
NONE, KEY_YEN, KEY_KPCOMMA, NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user