-/* $OpenBSD: hidkbd.c,v 1.8 2022/11/09 10:05:18 robert Exp $ */
+/* $OpenBSD: hidkbd.c,v 1.9 2023/07/09 08:02:13 tobhe Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
{ 61, 129 }, /* F4 -> audio lower */
{ 62, 128 }, /* F5 -> audio raise */
#else
+ { 63, 102 }, /* F6 -> sleep */
{ 67, 127 }, /* F10 -> audio mute */
{ 68, 129 }, /* F11 -> audio lower */
{ 69, 128 }, /* F12 -> audio raise */
wskbd_rawinput(kbd->sc_wskbddev, cbuf, j);
/*
- * Pass audio and brightness keys to wskbd_input anyway.
+ * Pass audio, brightness and sleep keys to wskbd_input anyway.
*/
for (i = 0; i < nkeys; i++) {
key = ibuf[i];
switch (key & CODEMASK) {
+ case 102:
case 127:
case 128:
case 129:
#! /usr/bin/awk -f
-# $OpenBSD: makemap.awk,v 1.15 2020/11/02 19:45:18 tobhe Exp $
+# $OpenBSD: makemap.awk,v 1.16 2023/07/09 08:02:13 tobhe Exp $
#
# Copyright (c) 2005, Miodrag Vallat
#
#
BEGIN {
- rcsid = "$OpenBSD: makemap.awk,v 1.15 2020/11/02 19:45:18 tobhe Exp $"
+ rcsid = "$OpenBSD: makemap.awk,v 1.16 2023/07/09 08:02:13 tobhe Exp $"
ifdepth = 0
ignore = 0
declk = 0
# the ``menu'' key.
#
if (nmaps++ == 0) {
- # 102 Suspend
+ lines[102] = " KC(102),\tKS_Cmd_Sleep,"
lines[116] = " KC(116),\tKS_Open,"
lines[117] = " KC(117),\tKS_Help,"
lines[118] = " KC(118),\tKS_Props,"
-/* $OpenBSD: wskbd.c,v 1.114 2022/11/10 12:10:54 matthieu Exp $ */
+/* $OpenBSD: wskbd.c,v 1.115 2023/07/09 08:02:14 tobhe Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
if (*type != WSCONS_EVENT_KEY_DOWN)
return (0);
+#ifdef SUSPEND
+ if (ksym == KS_Cmd_Sleep) {
+ request_sleep(SLEEP_SUSPEND);
+ return (1);
+ }
+#endif
+
#ifdef HAVE_SCROLLBACK_SUPPORT
#if NWSDISPLAY > 0
switch (ksym) {
-/* $OpenBSD: wsksymdef.h,v 1.40 2023/01/23 09:36:40 nicm Exp $ */
+/* $OpenBSD: wsksymdef.h,v 1.41 2023/07/09 08:02:14 tobhe Exp $ */
/* $NetBSD: wsksymdef.h,v 1.34.4.1 2000/07/07 09:49:54 hannken Exp $ */
/*-
#define KS_Cmd_ScrollBack 0xf42c
#define KS_Cmd_ScrollFwd 0xf42d
#define KS_Cmd_KbdReset 0xf42e
+#define KS_Cmd_Sleep 0xf42f
/*
* Group 5 (internal)