summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2002-08-29 22:19:33 +0000
committermiod <miod@openbsd.org>2002-08-29 22:19:33 +0000
commitfc92d1bc1f6897028b18d0f3d3b783549798eec3 (patch)
tree0e069506ee21adc48b1555ca23dc1f8c503f3596
parentDefine new wscons symbols for the L function keys found on Sun keyboards, (diff)
downloadwireguard-openbsd-fc92d1bc1f6897028b18d0f3d3b783549798eec3.tar.xz
wireguard-openbsd-fc92d1bc1f6897028b18d0f3d3b783549798eec3.zip
Produce the same escape codes as SunOS with the L function keys in console.
(tested against Solaris 2.5)
-rw-r--r--sys/dev/wscons/wsemul_sun.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c
index da531ebf086..b8919392e3b 100644
--- a/sys/dev/wscons/wsemul_sun.c
+++ b/sys/dev/wscons/wsemul_sun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_sun.c,v 1.6 2002/07/25 19:03:25 miod Exp $ */
+/* $OpenBSD: wsemul_sun.c,v 1.7 2002/08/29 22:19:33 miod Exp $ */
/* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */
/*
@@ -567,6 +567,21 @@ static char *sun_fkeys[] = {
"\033[233z", /* F10 */
};
+static char *sun_lkeys[] = {
+ "\033[207z", /* KS_Help */
+ NULL, /* KS_Execute */
+ "\033[200z", /* KS_Find */
+ NULL, /* KS_Select */
+ "\033[193z", /* KS_Again */
+ "\033[194z", /* KS_Props */
+ "\033[195z", /* KS_Undo */
+ "\033[196z", /* KS_Front */
+ "\033[197z", /* KS_Copy */
+ "\033[198z", /* KS_Open */
+ "\033[199z", /* KS_Paste */
+ "\033[201z", /* KS_Cut */
+};
+
int
wsemul_sun_translate(cookie, in, out)
void *cookie;
@@ -593,6 +608,10 @@ wsemul_sun_translate(cookie, in, out)
*out = sun_fkeys[in - KS_KP_F1];
return (6);
}
+ if (in >= KS_Help && in <= KS_Cut && sun_lkeys[in - KS_Help] != NULL) {
+ *out = sun_lkeys[in - KS_Help];
+ return (6);
+ }
switch (in) {
case KS_Home: