> Date: Sun, 9 Apr 2023 22:56:01 +0200
> From: Tobias Heider <tobias.hei...@stusta.de>
> 
> This patch enables the capslock LED on apple m1/m2 laptops in xenocara.
> Console mode was already working by setting the correct accessop, for
> X we are missing an ioctl handler.
> 
> Only tested on apldc but the aplhidev code looks identical so the fix
> should be the same.

ok kettenis@

> Index: apldc.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm64/dev/apldc.c,v
> retrieving revision 1.6
> diff -u -p -r1.6 apldc.c
> --- apldc.c   26 Mar 2023 09:34:06 -0000      1.6
> +++ apldc.c   9 Apr 2023 20:52:25 -0000
> @@ -1169,6 +1169,9 @@ apldckbd_ioctl(void *v, u_long cmd, cadd
>               /* XXX: should we set something else? */
>               *(u_int *)data = WSKBD_TYPE_USB;
>               return 0;
> +     case WSKBDIO_SETLEDS:
> +             apldckbd_set_leds(v, *(int *)data);
> +             return 0;
>       default:
>               return hidkbd_ioctl(kbd, cmd, data, flag, p);
>       }
> Index: aplhidev.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm64/dev/aplhidev.c,v
> retrieving revision 1.10
> diff -u -p -r1.10 aplhidev.c
> --- aplhidev.c        21 Nov 2022 14:39:23 -0000      1.10
> +++ aplhidev.c        9 Apr 2023 20:52:25 -0000
> @@ -596,6 +596,9 @@ aplkbd_ioctl(void *v, u_long cmd, caddr_
>               /* XXX: should we set something else? */
>               *(u_int *)data = WSKBD_TYPE_USB;
>               return 0;
> +     case WSKBDIO_SETLEDS:
> +             aplkbd_set_leds(v, *(int *)data);
> +             return 0;
>       default:
>               return hidkbd_ioctl(kbd, cmd, data, flag, p);
>       }
> 
> 

Reply via email to