ref: ea5797c0731203c09ec5fb7172e77eab2750f1a9
parent: 98f47d5867cbbaa06f2c9080c301c9191e196205
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Nov 22 19:50:15 EST 2013
kbdfs: add esc1+shift and esc1+ctrl pages (see sources kbmap-uk-weird patch) Add pages for esc1+shift and esc1+ctrl - some UK USB keyboards (Dell) and it seems some German ones: https://groups.google.com/forum/#!topic/comp.os.plan9/ycok6NTCWCg seem to generate an esc1 + code scancode combination for the pipe/backslash key. Seems like overkill to add two whole pages for just two keys, but there again RAM is cheap these days. Probably should take the changes across to omap/kbd.c (and by extension bcm/kbd.c) but the changes are trivial.
--- a/sys/lib/kbmap/uk
+++ b/sys/lib/kbmap/uk
@@ -4,4 +4,9 @@
1 4 '£
1 40 '@
0 86 '\
+4 86 ^\
1 86 '|
+
+2 86 '\
+5 86 ^\
+6 86 '|
--- a/sys/src/cmd/aux/kbdfs/kbdfs.c
+++ b/sys/src/cmd/aux/kbdfs/kbdfs.c
@@ -180,6 +180,46 @@
[0x78] 0, Kup, 0, 0, 0, 0, 0, 0,
};
+Rune kbtabshiftesc1[Nscan] =
+{+[0x00] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x08] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x10] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x18] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x20] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x28] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x30] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x38] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x40] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x48] Kup, 0, 0, 0, 0, 0, 0, 0,
+[0x50] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x58] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x60] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x68] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x70] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x78] 0, Kup, 0, 0, 0, 0, 0, 0,
+};
+
+Rune kbtabctrlesc1[Nscan] =
+{+[0x00] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x08] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x10] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x18] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x20] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x28] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x30] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x38] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x40] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x48] Kup, 0, 0, 0, 0, 0, 0, 0,
+[0x50] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x58] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x60] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x68] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x70] 0, 0, 0, 0, 0, 0, 0, 0,
+[0x78] 0, Kup, 0, 0, 0, 0, 0, 0,
+};
+
Rune kbtabaltgr[Nscan] =
{[0x00] 0, 0, 0, 0, 0, 0, 0, 0,
@@ -251,7 +291,11 @@
if(c >= Nscan)
return;
- if(scan->esc1)
+ if(scan->esc1 && scan->ctl)
+ key.r = kbtabctrlesc1[c];
+ else if(scan->esc1 && scan->shift)
+ key.r = kbtabshiftesc1[c];
+ else if(scan->esc1)
key.r = kbtabesc1[c];
else if(scan->shift)
key.r = kbtabshift[c];
@@ -823,6 +867,10 @@
return &kbtabaltgr[sc];
case 4:
return &kbtabctl[sc];
+ case 5:
+ return &kbtabctrlesc1[sc];
+ case 6:
+ return &kbtabshiftesc1[sc];
}
}
--
⑨