Korean keyboard have HanYeong(korean english toggle key, generally called Hangul) and hanja(korean chiness convesion key) keys.
In PS/2 keyboard, HanYeong has scancode 0xF2, and hanja has scancode 0xF1 and don't have release keys.
Firstly, I saw the kernel's source code. There is kdbmux and atkbd (and ukbd).
In atkdb, there are three mode k_RAW, K_CODE. and K_XLATE.
K_RAW just return scancode and K_CODE return (keycode | (scancode & 0x80)); and K_XLATE return ascii. and K_XLATE return ascii code. in console, K_XLATE seems like default mode.
(In console,) key is recognized by genkbd_keyaction. like this.
action = genkbd_keyaction(kbd, keycode, scancode & 0x80, &state->ks_state, &state->ks_accents);
Because 0xF2 is over 0x80, Hanyeong key is interpreted as release key and just ignored.
However, It is not a real problem because X receives as RAW scancode and does not inherit console keymap and there is no IME in console mode.
So it is real question. How can I set HanYeong and hanja keys in bsdkbdmap.c or whaterver? Or I miss guess?
For USB keyboard I can't sure but it might works correctly. (They are same key with EISU and KANA)
In PS/2 keyboard, HanYeong has scancode 0xF2, and hanja has scancode 0xF1 and don't have release keys.
Firstly, I saw the kernel's source code. There is kdbmux and atkbd (and ukbd).
In atkdb, there are three mode k_RAW, K_CODE. and K_XLATE.
Code:
#define K_RAW 0 /* keyboard returns scancodes */
#define K_XLATE 1 /* keyboard returns ascii */
#define K_CODE 2 /* keyboard returns keycodes */
K_RAW just return scancode and K_CODE return (keycode | (scancode & 0x80)); and K_XLATE return ascii. and K_XLATE return ascii code. in console, K_XLATE seems like default mode.
(In console,) key is recognized by genkbd_keyaction. like this.
action = genkbd_keyaction(kbd, keycode, scancode & 0x80, &state->ks_state, &state->ks_accents);
Because 0xF2 is over 0x80, Hanyeong key is interpreted as release key and just ignored.
However, It is not a real problem because X receives as RAW scancode and does not inherit console keymap and there is no IME in console mode.
So it is real question. How can I set HanYeong and hanja keys in bsdkbdmap.c or whaterver? Or I miss guess?
For USB keyboard I can't sure but it might works correctly. (They are same key with EISU and KANA)