[Bug 265260] HANGEUL and HANJA on Korean keyboards do not work.
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 265260] HANGEUL and HANJA on Korean keyboards do not work."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Jul 2022 19:50:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265260 --- Comment #1 from warioburn <warioburn@yahoo.co.jp> --- Oops, There was a mistake. Chinese key is 0xF1, hanyoung key is 0xf2, as opposed to usb. Anyway, I found a workaround about xorg-xf86-input-keyboard. static int isKoreankey(unsigned char c) { return c == 0xF1 || c== 0xF2; } static void stdReadInput(InputInfoPtr pInfo) { KbdDevPtr pKbd = (KbdDevPtr) pInfo->private; unsigned char rBuf[64]; int nBytes, i; if ((nBytes = read( pInfo->fd, (char *)rBuf, sizeof(rBuf))) > 0) { for (i = 0; i < nBytes; i++) if(isKoreankey(rBuf[i])){ pKbd->PostEvent(pInfo, rBuf[i], TRUE); pKbd->PostEvent(pInfo, rBuf[i], FALSE); }else{ pKbd->PostEvent(pInfo, rBuf[i] & 0x7f, rBuf[i] & 0x80 ? FALSE : TRUE); } } } It's not pretty code, but it seems to work. If there is no problem, I'll make a bug report about it later. It's not ideal, but I think there is no choice but to take the same approach for evdev . if (keycode != KEY_RESERVED) { if(Korean key){ evdev_push_event(state->ks_evdev, EV_KEY,(uint16_t)keycode, 1); evdev_push_event(state->ks_evdev, EV_KEY,(uint16_t)keycode, 0); evdev_sync(state->ks_evdev); }else{ //do like before } } K_CODE mode also similar code. /* keycode to key action */ action = genkbd_keyaction(kbd, keycode, scancode & 0x80, &state->ks_state, &state->ks_accents); The workaround will be similar. -- You are receiving this mail because: You are the assignee for the bug.