summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorkvik <kvik@a-b.xyz>2020-10-01 17:47:52 +0200
committerkvik <kvik@a-b.xyz>2020-10-01 17:47:52 +0200
commitfa1d6ffd83a6f9de19632c43c46412c8a41b4cc5 (patch)
tree93881bb500526a16fcac6ee481b2929ac0d17294 /sys
parentc63cd980a4f9d00360d63f61880e12c677bf4b70 (diff)
bootrc: allow kbmap to be set via plan9.ini (thanks Aaron Bieber)
Diffstat (limited to 'sys')
-rw-r--r--sys/man/8/plan9.ini14
-rw-r--r--sys/src/9/boot/bootfs.proto4
-rwxr-xr-xsys/src/9/boot/bootrc7
3 files changed, 24 insertions, 1 deletions
diff --git a/sys/man/8/plan9.ini b/sys/man/8/plan9.ini
index 296439feb..765aad04b 100644
--- a/sys/man/8/plan9.ini
+++ b/sys/man/8/plan9.ini
@@ -571,10 +571,22 @@ are automatically detected and need no configuration lines.
The line
.B serial=type=com
can be used to specify settings for a PCMCIA modem.
+.SS \fLkbmap=\fIvalue\fP
+This specifies the keyboard map to use.
+.I Value
+can be a map file found in
+.B /sys/lib/kbmap
+on the ramdisk.
+.PP
+For example:
+.TP
+.B kbmap=colemak
.SS \fLmouseport=\fIvalue\fP
This specifies where the mouse is attached.
.I Value
-can be
+can be a map file found in
+.B /sys/lib/kbmap
+on the ramdisk.
.TP
.B ps2
the PS2 mouse/keyboard port. The BIOS setup procedure
diff --git a/sys/src/9/boot/bootfs.proto b/sys/src/9/boot/bootfs.proto
index 1bffa0c47..c9cf1fbe3 100644
--- a/sys/src/9/boot/bootfs.proto
+++ b/sys/src/9/boot/bootfs.proto
@@ -58,6 +58,10 @@ rc
nusbrc 555 sys sys ../boot/nusbrc
bootrc 555 sys sys ../boot/bootrc
tmp
+sys
+ lib
+ kbmap
+ +
lib
firmware
+
diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc
index 9e9099204..7931855dd 100755
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -170,6 +170,13 @@ if(test -x /bin/aux/kbdfs){
if(! ~ $#a 0)
a=/dev/eia^$a
aux/kbdfs -q -s cons $a
+
+ if(! ~$#kbmap 0){
+ if(test -f /sys/lib/kbmap/$kbmap){
+ echo 'setting kbmap to' $kbmap
+ cat /sys/lib/kbmap/$kbmap >/dev/kbmap
+ }
+ }
}
# usb devices