Created attachment 215595 [details] evdev.patch Modern Xorg reads key events from /dev/input/? via libinput. Due to lack of conversion table entry in evdev, I can't use 'Eisu' & 'Kana' keys of Apple Wireless Keyboard JIS. These keys are assigned to same scan code of 'Hangul_Hanja' & 'Hangul' by Apple. Evdev already has 'Hangul_Hanja' & 'Hangul' entry in USB scan code map. So I added same key code in set1 scan code map. Please apply to attached 'evdev.patch' to head source tree. I also want to MFC to stable-12. Thank you.
Thank you for your report and patch
Thank you for patch. It looks good to me. There are 2 questions left: 1. Is it real bluetooth (not RF-dongle based) keyboard? 2. If it is, what the 'sysctl kern.evdev.rcpt_mask' returns on your host? Native bluetooth HID to evdev conversion table resides in usr.sbin/bluetooth/bthidd/btuinput.c. It is active when kern.evdev.rcpt_mask sysctl is set to 12. Could you test it?
(In reply to Vladimir Kondratyev from comment #2) > 1. Is it real bluetooth (not RF-dongle based) keyboard? Yes, My bluetooth dongle is as follows. ubt0 on uhub0 ubt0: <vendor 0x0a12 CSR8510 A10, class 224/1, rev 2.00/88.91, addr 2> on usbus0 > 2. If it is, what the 'sysctl kern.evdev.rcpt_mask' returns on your host? `sysctl kern.evdev.rcpt_mask` show as follows. $ sysctl kern.evdev.rcpt_mask kern.evdev.rcpt_mask: 3 `sysctl kern.evdev` shows as follows. $ sysctl kern.evdev kern.evdev.input.5.uniq: kern.evdev.input.5.phys: ums0 kern.evdev.input.5.id: { bustype = 0x0003, vendor = 0x056e, product = 0x0107, version = 0x0000 } kern.evdev.input.5.name: Compx wireless dongle, class 0/0, rev 1.10/1.00, addr 3 kern.evdev.input.3.uniq: kern.evdev.input.3.phys: ukbd0 kern.evdev.input.3.id: { bustype = 0x0003, vendor = 0x056e, product = 0x0107, version = 0x0000 } kern.evdev.input.3.name: Compx wireless dongle, class 0/0, rev 1.10/1.00, addr 3 kern.evdev.input.4.uniq: 10:9a:dd:99:ba:ce kern.evdev.input.4.phys: 00:1b:dc:06:ca:6a kern.evdev.input.4.id: { bustype = 0x0005, vendor = 0x0000, product = 0x0000, version = 0x0000 } kern.evdev.input.4.name: Bluetooth Keyboard, bdaddr 10:9a:dd:99:ba:ce kern.evdev.input.2.uniq: kern.evdev.input.2.phys: atkbd0 kern.evdev.input.2.id: { bustype = 0x0011, vendor = 0x0001, product = 0x0001, version = 0x0000 } kern.evdev.input.2.name: AT keyboard kern.evdev.input.1.uniq: kern.evdev.input.1.phys: kbdmux0 kern.evdev.input.1.id: { bustype = 0x0006, vendor = 0x0000, product = 0x0000, version = 0x0000 } kern.evdev.input.1.name: System keyboard multiplexer kern.evdev.input.0.uniq: kern.evdev.input.0.phys: sysmouse kern.evdev.input.0.id: { bustype = 0x0006, vendor = 0x0000, product = 0x0000, version = 0x0000 } kern.evdev.input.0.name: System mouse kern.evdev.sysmouse_t_axis: 0 kern.evdev.rcpt_mask: 3 I'm also using RF-dongle based mouse but not keyboard. But RF-dongle can be shown as ums0 and ukb0. >Native bluetooth HID to evdev conversion table resides in usr.sbin/bluetooth/bthidd/btuinput.c. It is active when kern.evdev.rcpt_mask sysctl is set to 12. Could you test it? When I set `sysctl kern.evdev.rcpt_mask=12`, 'Eisu' and 'Kana' key events are read from libevent with GENERIC (not my patched) kernel. And I'm sorry that I made a mistake about FreeBSD version. I'm using the bluetooth keyboard for 12.1-RELEASE machine. So all information above are FreeBSD 12.1-RELEASE. I tried FreeBSD-Current(r362253) machine, kern.evdev.rcpt_mask was 12. And 'Eisu' and 'Kana' key events are read from libevent.
A commit references this bug: Author: wulf Date: Wed Jun 17 08:35:36 UTC 2020 New revision: 362260 URL: https://svnweb.freebsd.org/changeset/base/362260 Log: evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys. PR: 247292 Submitted by: Yuichiro NAITO <naito.yuichiro@gmail.com> MFC after: 1 week Changes: head/sys/dev/evdev/evdev_utils.c
A commit references this bug: Author: wulf Date: Thu Jun 25 00:00:04 UTC 2020 New revision: 362597 URL: https://svnweb.freebsd.org/changeset/base/362597 Log: MFC r362260: evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys. PR: 247292 Submitted by: Yuichiro NAITO <naito.yuichiro@gmail.com> Changes: _U stable/12/ stable/12/sys/dev/evdev/evdev_utils.c
A commit references this bug: Author: wulf Date: Thu Jun 25 00:01:25 UTC 2020 New revision: 362598 URL: https://svnweb.freebsd.org/changeset/base/362598 Log: MFC r362260: evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys. PR: 247292 Submitted by: Yuichiro NAITO <naito.yuichiro@gmail.com> Changes: _U stable/11/ stable/11/sys/dev/evdev/evdev_utils.c
Committed. Thanks.