From: George Bronnikov <goga@bronnikov.mccme.ru>
To: <9fans@cse.psu.edu>
Subject: [9fans] kbd.c
Date: Sat, 23 Mar 2002 15:01:41 +0300 [thread overview]
Message-ID: <Pine.LNX.4.30.0203231453360.878-400000@donkey.bronnikov.mccme.ru> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 349 bytes --]
Hello,
Attached are:
1. A diff to Boyd's/Forsyth's keyboard driver (/sys/src/9/pc/kbd.c) that
lets it have separate tables for capslock and shift+capslock (tables 4 and 5).
2. Russian keyboard table using this diff (capslock serves to switch
between cyrillic and latin modes).
3. An awk script to feed the table into /dev/kbmap.
goga
[-- Attachment #2: Type: TEXT/PLAIN, Size: 64 bytes --]
#!/bin/awk -f
/#/ {next}
/^$/ {next}
{ print $1, $2, $3}
[-- Attachment #3.1: Type: text/plain, Size: 425 bytes --]
The following attachment had content that we can't
prove to be harmless. To avoid possible automatic
execution, we changed the content headers.
The original header was:
Content-Type: TEXT/PLAIN; charset=koi8-r; name="kbmap.cyr"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.30.0203231501411.878@donkey.bronnikov.mccme.ru>
Content-Description:
Content-Disposition: attachment; filename="kbmap.cyr"
[-- Attachment #3.2: kbmap.cyr.suspect --]
[-- Type: application/octet-stream, Size: 1415 bytes --]
# Setting Caps Lock
0 0x3a 0xf864
1 0x3a 0xf864
4 0x3a 0xf864
5 0x3a 0xf864
# Russian unshifted characters
4 0x10 0x439 ;й
4 0x11 0x446 ;ц
4 0x12 0x443 ;у
4 0x13 0x43a ;к
4 0x14 0x435 ;е
4 0x15 0x43d ;н
4 0x16 0x433 ;г
4 0x17 0x448 ;ш
4 0x18 0x449 ;щ
4 0x19 0x437 ;з
4 0x1a 0x445 ;х
4 0x1b 0x44a ;ъ
4 0x1e 0x444 ;ф
4 0x1f 0x44b ;ы
4 0x20 0x432 ;в
4 0x21 0x430 ;а
4 0x22 0x43f ;п
4 0x23 0x440 ;р
4 0x24 0x43e ;о
4 0x25 0x43b ;л
4 0x26 0x434 ;д
4 0x27 0x436 ;ж
4 0x28 0x44d ;э
4 0x2c 0x44f ;я
4 0x2d 0x447 ;ч
4 0x2e 0x441 ;с
4 0x2f 0x43c ;м
4 0x30 0x438 ;и
4 0x31 0x442 ;т
4 0x32 0x44c ;ь
4 0x33 0x431 ;б
4 0x34 0x44e ;ю
4 0x29 0x451 ;ё
# Russian shifted characters
5 0x10 0x419 ;Й
5 0x11 0x426 ;Ц
5 0x12 0x423 ;У
5 0x13 0x41a ;К
5 0x14 0x415 ;Е
5 0x15 0x41d ;Н
5 0x16 0x413 ;Г
5 0x17 0x428 ;Ш
5 0x18 0x429 ;Щ
5 0x19 0x417 ;З
5 0x1a 0x425 ;Х
5 0x1b 0x42a ;Ъ
5 0x1e 0x424 ;Ф
5 0x1f 0x42b ;Ы
5 0x20 0x412 ;В
5 0x21 0x410 ;А
5 0x22 0x41f ;П
5 0x23 0x420 ;Р
5 0x24 0x41e ;О
5 0x25 0x41b ;Л
5 0x26 0x414 ;Д
5 0x27 0x416 ;Ж
5 0x28 0x42d ;Э
5 0x2c 0x42f ;Я
5 0x2d 0x427 ;Ч
5 0x2e 0x421 ;С
5 0x2f 0x41c ;М
5 0x30 0x418 ;И
5 0x31 0x422 ;Т
5 0x32 0x42c ;Ь
5 0x33 0x411 ;Б
5 0x34 0x42e ;Ю
5 0x29 0x401 ;Ё
5 0x04 '"'
5 0x06 ':'
5 0x07 ','
5 0x08 '.'
[-- Attachment #4: Type: TEXT/PLAIN, Size: 2113 bytes --]
138a139,178
> Rune kbtabcaps[Nscan] =
> {
> [0x00] No, 0x1b, '1', '2', '3', '4', '5', '6',
> [0x08] '7', '8', '9', '0', '-', '=', '\b', '\t',
> [0x10] 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I',
> [0x18] 'O', 'P', '[', ']', '\n', Ctrl, 'A', 'S',
> [0x20] 'D', 'F', 'G', 'H', 'J', 'K', 'L', ';',
> [0x28] '\'', '`', Shift, '\\', 'Z', 'X', 'C', 'V',
> [0x30] 'B', 'N', 'M', ',', '.', '/', Shift, '*',
> [0x38] Latin, ' ', Ctrl, KF|1, KF|2, KF|3, KF|4, KF|5,
> [0x40] KF|6, KF|7, KF|8, KF|9, KF|10, Num, Scroll, '7',
> [0x48] '8', '9', '-', '4', '5', '6', '+', '1',
> [0x50] '2', '3', '0', '.', No, No, No, KF|11,
> [0x58] KF|12, No, No, No, No, No, No, No,
> [0x60] No, No, No, No, No, No, No, No,
> [0x68] No, No, No, No, No, No, No, No,
> [0x70] No, No, No, No, No, No, No, No,
> [0x78] No, Up, No, Up, No, No, No, No,
> };
>
> Rune kbtabshiftcaps[Nscan] =
> {
> [0x00] No, 0x1b, '!', '@', '#', '$', '%', '^',
> [0x08] '&', '*', '(', ')', '_', '+', '\b', '\t',
> [0x10] 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i',
> [0x18] 'o', 'p', '{', '}', '\n', Ctrl, 'a', 's',
> [0x20] 'd', 'f', 'g', 'h', 'j', 'k', 'l', ':',
> [0x28] '"', '~', Shift, '|', 'z', 'x', 'c', 'v',
> [0x30] 'b', 'n', 'm', '<', '>', '?', Shift, '*',
> [0x38] Latin, ' ', Ctrl, KF|1, KF|2, KF|3, KF|4, KF|5,
> [0x40] KF|6, KF|7, KF|8, KF|9, KF|10, Num, Scroll, '7',
> [0x48] '8', '9', '-', '4', '5', '6', '+', '1',
> [0x50] '2', '3', '0', '.', No, No, No, KF|11,
> [0x58] KF|12, No, No, No, No, No, No, No,
> [0x60] No, No, No, No, No, No, No, No,
> [0x68] No, No, No, No, No, No, No, No,
> [0x70] No, No, No, No, No, No, No, No,
> [0x78] No, View, No, Up, No, No, No, No,
> };
>
310c350,354
< } else if(shift)
---
> } else if (shift &&caps)
> c = kbtabshiftcaps[c];
> else if (caps)
> c = kbtabcaps[c];
> else if(shift)
317,319d360
< if(caps && c<='z' && c>='a')
< c += 'A' - 'a';
<
475a517,518
> case 4: kbtabcaps[scanc] = r; break;
> case 5: kbtabshiftcaps[scanc] = r; break;
491a535,536
> case 4: *r = kbtabcaps[*sc]; return 1;
> case 5: *r = kbtabshiftcaps[*sc]; return 1;
next reply other threads:[~2002-03-23 12:01 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-23 12:01 George Bronnikov [this message]
2002-03-30 21:05 ` FJ Ballesteros
2002-03-31 12:45 ` Boyd Roberts
2002-03-30 21:08 rob pike, esq.
2002-03-31 18:58 ` FJ Ballesteros
2002-04-01 0:36 ` Boyd Roberts
2002-04-01 0:42 ` Boyd Roberts
2002-03-30 21:10 rob pike, esq.
2002-03-30 21:20 Geoff Collyer
2002-04-08 12:47 ` Matthew C Weigel
2002-03-30 21:28 rob pike, esq.
2002-03-30 22:41 ` Richard
2002-03-30 22:47 ` Digby Tarvin
2002-03-31 11:26 ` kazumi iwane
2002-03-31 12:21 ` kazumi iwane
2002-03-31 2:47 ` kazumi iwane
2002-03-31 18:32 ` George Bronnikov
2002-04-01 0:47 ` Boyd Roberts
2002-04-01 6:50 ` George Bronnikov
2002-04-01 7:22 ` Lucio De Re
2002-04-01 11:35 ` Boyd Roberts
2002-04-01 16:27 ` kazumi iwane
2002-04-01 16:33 ` Lucio De Re
2002-04-01 11:34 ` Boyd Roberts
2002-03-30 23:13 Russ Cox
2002-03-31 5:40 rob pike, esq.
2002-03-31 10:24 forsyth
2002-03-31 14:48 bwc
2002-03-31 15:13 ` Boyd Roberts
2002-03-31 17:06 ` Digby Tarvin
2002-03-31 19:35 andrey mirtchovski
2002-04-01 1:40 okamoto
2002-04-01 1:54 okamoto
2002-04-01 14:01 rob pike, esq.
2002-04-02 1:58 okamoto
2002-04-02 5:04 plan9
2002-04-02 8:17 Fco.J.Ballesteros
2002-04-02 8:28 Fco.J.Ballesteros
2002-04-02 9:31 forsyth
2002-04-02 9:44 ` Boyd Roberts
2002-04-02 10:42 forsyth
2002-04-08 12:54 ` Andries Brouwer
2002-04-02 10:48 forsyth
2002-04-02 10:56 ` Lucio De Re
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.30.0203231453360.878-400000@donkey.bronnikov.mccme.ru \
--to=goga@bronnikov.mccme.ru \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).