]> git.lizzy.rs Git - plan9front.git/commitdiff
bootrc: allow kbmap to be set via plan9.ini (thanks Aaron Bieber)
authorkvik <kvik@a-b.xyz>
Thu, 1 Oct 2020 15:47:52 +0000 (17:47 +0200)
committerkvik <kvik@a-b.xyz>
Thu, 1 Oct 2020 15:47:52 +0000 (17:47 +0200)
sys/man/8/plan9.ini
sys/src/9/boot/bootfs.proto
sys/src/9/boot/bootrc

index 296439feb832e9891d69373864fdf80f64e16db9..765aad04b4c74bf427ca20f38be2f9679374cfd3 100644 (file)
@@ -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
index 1bffa0c472e097fa94f8e30bdfa777e33caf259e..c9cf1fbe36e530d036a0a7b95b58186c31c46fff 100644 (file)
@@ -58,6 +58,10 @@ rc
                nusbrc 555 sys sys ../boot/nusbrc
                bootrc 555 sys sys ../boot/bootrc
 tmp
+sys
+       lib
+               kbmap
+                       +
 lib
        firmware
                +
index 9e9099204b80e6551d1c52035831a3dd127760b4..7931855dd4e698931f4d450a8258b3857f3ff60b 100755 (executable)
@@ -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