From 9ff4421e509ac2a7431e5a07ac3d86f896dbbb3e Mon Sep 17 00:00:00 2001 From: tobhe Date: Mon, 10 Apr 2023 15:14:04 +0000 Subject: [PATCH] Enable caps lock LED on modern Apple laptop keyboards. ok kettenis@ patrick@ --- sys/arch/arm64/dev/apldc.c | 5 ++++- sys/arch/arm64/dev/aplhidev.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm64/dev/apldc.c b/sys/arch/arm64/dev/apldc.c index 454099d2515..a4a4b3010eb 100644 --- a/sys/arch/arm64/dev/apldc.c +++ b/sys/arch/arm64/dev/apldc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apldc.c,v 1.6 2023/03/26 09:34:06 jsg Exp $ */ +/* $OpenBSD: apldc.c,v 1.7 2023/04/10 15:14:04 tobhe Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -1169,6 +1169,9 @@ apldckbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) /* 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); } diff --git a/sys/arch/arm64/dev/aplhidev.c b/sys/arch/arm64/dev/aplhidev.c index 265c5196168..5b0c8185f2b 100644 --- a/sys/arch/arm64/dev/aplhidev.c +++ b/sys/arch/arm64/dev/aplhidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplhidev.c,v 1.10 2022/11/21 14:39:23 kettenis Exp $ */ +/* $OpenBSD: aplhidev.c,v 1.11 2023/04/10 15:14:04 tobhe Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * Copyright (c) 2013-2014 joshua stein @@ -596,6 +596,9 @@ aplkbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) /* 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); } -- 2.20.1