summaryrefslogtreecommitdiff
path: root/sys/dev/usb/makemap.awk
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-05-23 21:33:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-05-23 21:33:04 +0000
commitfd8df8427b4836e0f55c4caab26f9b78914d9171 (patch)
treedf249688622a54a3f68a5a67b1ecef4e5a8062f7 /sys/dev/usb/makemap.awk
parent063fc8e0305977e98cbac3e0eb6b4fdfdaef52f2 (diff)
Duplicate keycode 50 as keycode 49, some USB keyboards use the latter.
with and ok millert@
Diffstat (limited to 'sys/dev/usb/makemap.awk')
-rw-r--r--sys/dev/usb/makemap.awk17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/usb/makemap.awk b/sys/dev/usb/makemap.awk
index 6b24cf40605..2336aea35d3 100644
--- a/sys/dev/usb/makemap.awk
+++ b/sys/dev/usb/makemap.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $OpenBSD: makemap.awk,v 1.5 2005/05/19 17:49:54 miod Exp $
+# $OpenBSD: makemap.awk,v 1.6 2005/05/23 21:33:03 miod Exp $
#
# Copyright (c) 2005, Miodrag Vallat
#
@@ -31,7 +31,7 @@
#
BEGIN {
- rcsid = "$OpenBSD: makemap.awk,v 1.5 2005/05/19 17:49:54 miod Exp $"
+ rcsid = "$OpenBSD: makemap.awk,v 1.6 2005/05/23 21:33:03 miod Exp $"
ifdepth = 0
ignore = 0
declk = 0
@@ -299,10 +299,15 @@ $1 == "#define" || $1 == "#undef" {
}
if (haskeys) {
- # Duplicate 42 (backspace) as 76
- # XXX maybe not correct anymore?
- lines[76] = lines[42]
- sub("42", "76", lines[76])
+ # Duplicate 42 (backspace) as 76 and 50 (backslash bar) as 49
+ if (!lines[76]) {
+ lines[76] = lines[42]
+ sub("42", "76", lines[76])
+ }
+ if (!lines[49]) {
+ lines[49] = lines[50]
+ sub("50", "49", lines[49])
+ }
for (i = 0; i < 256; i++)
if (lines[i]) {