diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-11-23 00:50:15 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-11-23 00:50:15 +0100 |
commit | ea5797c0731203c09ec5fb7172e77eab2750f1a9 (patch) | |
tree | f187e045f56e01c87a705fba3bad66a237cb7468 | |
parent | 98f47d5867cbbaa06f2c9080c301c9191e196205 (diff) | |
download | plan9front-ea5797c0731203c09ec5fb7172e77eab2750f1a9.tar.xz |
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.
-rw-r--r-- | sys/lib/kbmap/uk | 5 | ||||
-rw-r--r-- | sys/src/cmd/aux/kbdfs/kbdfs.c | 50 |
2 files changed, 54 insertions, 1 deletions
diff --git a/sys/lib/kbmap/uk b/sys/lib/kbmap/uk index 96641c853..aa689b834 100644 --- 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 '| diff --git a/sys/src/cmd/aux/kbdfs/kbdfs.c b/sys/src/cmd/aux/kbdfs/kbdfs.c index 8bbe77f75..f812b958f 100644 --- a/sys/src/cmd/aux/kbdfs/kbdfs.c +++ b/sys/src/cmd/aux/kbdfs/kbdfs.c @@ -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]; } } |