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.
This commit is contained in:
cinap_lenrek 2013-11-23 00:50:15 +01:00
parent 98f47d5867
commit ea5797c073
2 changed files with 54 additions and 1 deletions

View file

@ -4,4 +4,9 @@
1 4 '£
1 40 '@
0 86 '\
4 86 ^\
1 86 '|
2 86 '\
5 86 ^\
6 86 '|

View file

@ -180,6 +180,46 @@ Rune kbtabesc1[Nscan] =
[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 @@ kbdputsc(Scan *scan, int c)
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 @@ kbmapent(int t, int sc)
return &kbtabaltgr[sc];
case 4:
return &kbtabctl[sc];
case 5:
return &kbtabctrlesc1[sc];
case 6:
return &kbtabshiftesc1[sc];
}
}