Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jul 2022 19:50:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 265260] HANGEUL and HANJA on Korean keyboards do not work.
Message-ID:  <bug-265260-227-dV80o5811F@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-265260-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-265260-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265260

--- 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 =3D=3D 0xF1 || c=3D=3D 0xF2;
}

static void
stdReadInput(InputInfoPtr pInfo)
{
    KbdDevPtr pKbd =3D (KbdDevPtr) pInfo->private;
    unsigned char rBuf[64];
    int nBytes, i;
    if ((nBytes =3D read( pInfo->fd, (char *)rBuf, sizeof(rBuf))) > 0) {
       for (i =3D 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 ma=
ke 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 !=3D 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 =3D genkbd_keyaction(kbd, keycode, scancode & 0x80,

&state->ks_state, &state->ks_accents);

The workaround will be similar.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265260-227-dV80o5811F>