1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Reintroduce Cyrillic Caps Lock mode, which was in 0.51 but got

kicked out by the Unicode patch. It's not very good - only works
sanely on US keyboards - but it's no worse than it was in 0.51.
After 0.52 maybe I should fix it properly.

[originally from svn r1273]
This commit is contained in:
Simon Tatham
2001-09-18 18:51:10 +00:00
parent f3b95b60b4
commit f3a17c0715
5 changed files with 64 additions and 7 deletions

View File

@ -524,6 +524,29 @@ void luni_send(wchar_t * widebuf, int len)
ldisc_send(linebuffer, p - linebuffer);
}
wchar_t xlat_uskbd2cyrllic(int ch)
{
static wchar_t cyrtab[] = {
0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 0x042d, 35, 36, 37, 38, 0x044d,
40, 41, 42, 0x0406, 0x0431, 0x0454, 0x044e, 0x002e,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 0x0416, 0x0436, 0x0411, 0x0456, 0x042e, 0x002c,
64, 0x0424, 0x0418, 0x0421, 0x0412, 0x0423, 0x0410, 0x041f,
0x0420, 0x0428, 0x041e, 0x041b, 0x0414, 0x042c, 0x0422, 0x0429,
0x0417, 0x0419, 0x041a, 0x042b, 0x0415, 0x0413, 0x041c, 0x0426,
0x0427, 0x041d, 0x042f, 0x0445, 0x0457, 0x044a, 94, 0x0404,
96, 0x0444, 0x0438, 0x0441, 0x0432, 0x0443, 0x0430, 0x043f,
0x0440, 0x0448, 0x043e, 0x043b, 0x0434, 0x044c, 0x0442, 0x0449,
0x0437, 0x0439, 0x043a, 0x044b, 0x0435, 0x0433, 0x043c, 0x0446,
0x0447, 0x043d, 0x044f, 0x0425, 0x0407, 0x042a, 126, 127
};
return cyrtab[ch&0x7F];
}
int check_compose(int first, int second)
{