> Found that the reason is that 'sc_apple_fn' inside 'ukbd_softc' is not
> being assigned to
> newly created 'sc_fn' inside 'hidkbd'

Argh, sorry about that.

Does the following diff fix the problem on your machine?

Index: ukbd.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/usb/ukbd.c,v
retrieving revision 1.87
diff -u -p -r1.87 ukbd.c
--- ukbd.c      16 Sep 2022 16:30:10 -0000      1.87
+++ ukbd.c      4 Oct 2022 18:27:49 -0000
@@ -131,7 +131,6 @@ struct ukbd_softc {
 
        struct hidkbd           sc_kbd;
        int                     sc_spl;
-       struct hid_location     sc_apple_fn;
 
 #ifdef DDB
        struct timeout          sc_ddb; /* for entering DDB */
@@ -242,7 +241,7 @@ ukbd_attach(struct device *parent, struc
 
        if (uha->uaa->vendor == USB_VENDOR_APPLE) {
                if (hid_locate(desc, dlen, HID_USAGE2(HUP_APPLE, HUG_FN_KEY),
-                   uha->reportid, hid_input, &sc->sc_apple_fn, &qflags)) {
+                   uha->reportid, hid_input, &kbd->sc_fn, &qflags)) {
                        if (qflags & HIO_VARIABLE) {
                                switch (uha->uaa->product) {
                                case USB_PRODUCT_APPLE_FOUNTAIN_ISO:

Reply via email to