Hi,
Today I fetched latest /src and fn key mapping in my Macbook stopped
working with
latest changes in hidkbd.c and ukbd.c
Found that the reason is that 'sc_apple_fn' inside 'ukbd_softc' is not
being assigned to
newly created 'sc_fn' inside 'hidkbd'
I attach possible one liner fix. This gets the mapping working again.
Thanks!
Leonardo
Index: sys/dev/usb/ukbd.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ukbd.c,v
retrieving revision 1.87
diff -u -p -r1.87 ukbd.c
--- sys/dev/usb/ukbd.c 16 Sep 2022 16:30:10 -0000 1.87
+++ sys/dev/usb/ukbd.c 4 Oct 2022 15:23:48 -0000
@@ -349,8 +349,10 @@ ukbd_intr(struct uhidev *addr, void *ibu
struct ukbd_softc *sc = (struct ukbd_softc *)addr;
struct hidkbd *kbd = &sc->sc_kbd;
- if (kbd->sc_enabled != 0)
+ if (kbd->sc_enabled != 0){
+ *(&kbd->sc_fn) = sc->sc_apple_fn;
hidkbd_input(kbd, (uint8_t *)ibuf, len);
+ }
}
int