Module Name: src Committed By: macallan Date: Sat Sep 12 18:10:38 UTC 2020
Modified Files: src/sys/dev/usb: ukbd.c Log Message: send PMF events for keyboard brightness hotkeys on apple laptops To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/dev/usb/ukbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/ukbd.c diff -u src/sys/dev/usb/ukbd.c:1.146 src/sys/dev/usb/ukbd.c:1.147 --- src/sys/dev/usb/ukbd.c:1.146 Sun Mar 29 10:46:10 2020 +++ src/sys/dev/usb/ukbd.c Sat Sep 12 18:10:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.146 2020/03/29 10:46:10 tih Exp $ */ +/* $NetBSD: ukbd.c,v 1.147 2020/09/12 18:10:37 macallan Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.146 2020/03/29 10:46:10 tih Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.147 2020/09/12 18:10:37 macallan Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -128,9 +128,9 @@ Static const struct ukbd_keycodetrans tr { 0x3e, IS_PMF | PMFE_AUDIO_VOLUME_UP }, { 0x3f, 0xd6 }, /* num lock */ { 0x40, 0xd7 }, - { 0x41, 0xd8 }, - { 0x42, 0xd9 }, /* kbd light down */ - { 0x43, 0xda }, /* kbd light up */ + { 0x41, IS_PMF | PMFE_KEYBOARD_BRIGHTNESS_TOGGLE }, + { 0x42, IS_PMF | PMFE_KEYBOARD_BRIGHTNESS_DOWN }, + { 0x43, IS_PMF | PMFE_KEYBOARD_BRIGHTNESS_UP }, { 0x44, 0xdb }, { 0x45, 0xdc }, { 0x4f, 0x4d }, /* Right -> End */