Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jul 2022 07:23:32 +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@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 265260
           Summary: HANGEUL and HANJA on Korean keyboards do not work.
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: warioburn@yahoo.co.jp

Korean keyboard have Hanyoung key (sometimes called Hanguel key) witch togg=
le
Korean/English input mode and a Hanja key witch covert korean letter to chi=
nese
letter.

Unlike before, x11's keycode conversion is done by evdev. That's why I'm
reporting here.
When tested with evtest, they are not recognized.


in /sys/dev/atkbdc/atkbd.c

There are several mode. Especially, K_CODE, K_RAW,K_ASCII, EVDEV.

Hanyoung and Hanja key is not recognized in all modes, but I will report ma=
inly
EVDEV part because it's most relevant.

First, the Hanyoung key is 0xF1 and the Hanja key is 0xF2.
Hanyoung/Hanja keys are generally greater than 0x80, which is genarlly
considered a release key. And it does not repeat or generate a release key.

Reference:https://www.win.tue.nl/~aeb/linux/kbd/scancodes-9.html



#ifdef EVDEV_SUPPORT
/* push evdev event */

if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && state->ks_evdev !=3D NULL) {
keycode =3D evdev_scancode2key(&state->ks_evdev_state,
scancode);

if (keycode !=3D KEY_RESERVED) {
        evdev_push_event(state->ks_evdev, EV_KEY,
        (uint16_t)keycode, scancode & 0x80 ? 0 : 1);
        evdev_sync(state->ks_evdev);
        }
}
#endif


After digging with atkbd driver source, it looks like this part is related.
There seems to be no problem that returning the keycode from evdev_scancode=
2key
and the definition is already in place with KEY_HANGEUL, KEY_HANJA.

evdev_push_event(state->ks_evdev, EV_KEY,
(uint16_t)keycode, scancode & 0x80 ? 0 : 1);

But here, if the scan code is greater than 0x80,
evdev_push_event -> evdev_send_event ->evdev_sparse_event
through these codes, EV_SKIP_EVENT is returned, it will be ignored.

So, wouldn't special processing for Hangul keys be necessary somewhere?







Notes on other parts.
K_CODE also has a similar problem, but even if it's not fixed, There is no =
big
problem. because, without ime, Hanyoung/Hanja key is meaningless.=20
But it's pretty much the same problem, so it shouldn't be difficult to fix.

For previously used xorg-xf86-input-keyboard package(This is how it worked
before,), receives the scan code through K_RAW and converts it to an X11 key
code.
I guess adding Hanyoung keys in the wsXtMap of bsd_KbdMap.c table, make it=
=20
work, but I can't make it sucess.

--=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>