mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-18 03:28:07 -05:00
Kestutis Kupciunas's Lithuanian-friendliness patch to TranslateKey
[originally from svn r847]
This commit is contained in:
parent
3a2a06b1fc
commit
0026e5ada7
8
window.c
8
window.c
@ -1890,10 +1890,12 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
|||||||
int r, i, code;
|
int r, i, code;
|
||||||
unsigned char * p = output;
|
unsigned char * p = output;
|
||||||
|
|
||||||
|
HKL kbd_layout = GetKeyboardLayout(0);
|
||||||
|
|
||||||
static WORD keys[3];
|
static WORD keys[3];
|
||||||
static int compose_char = 0;
|
static int compose_char = 0;
|
||||||
static WPARAM compose_key = 0;
|
static WPARAM compose_key = 0;
|
||||||
|
|
||||||
r = GetKeyboardState(keystate);
|
r = GetKeyboardState(keystate);
|
||||||
if (!r) memset(keystate, 0, sizeof(keystate));
|
if (!r) memset(keystate, 0, sizeof(keystate));
|
||||||
else
|
else
|
||||||
@ -1926,7 +1928,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
|||||||
debug(("*"));
|
debug(("*"));
|
||||||
debug((", S%02x", scan=(HIWORD(lParam) & 0xFF) ));
|
debug((", S%02x", scan=(HIWORD(lParam) & 0xFF) ));
|
||||||
|
|
||||||
ch = MapVirtualKey(wParam, 2);
|
ch = MapVirtualKeyEx(wParam, 2, kbd_layout);
|
||||||
if (ch>=' ' && ch<='~') debug((", '%c'", ch));
|
if (ch>=' ' && ch<='~') debug((", '%c'", ch));
|
||||||
else if (ch) debug((", $%02x", ch));
|
else if (ch) debug((", $%02x", ch));
|
||||||
|
|
||||||
@ -2310,7 +2312,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
|||||||
if(cfg.xlat_capslockcyr)
|
if(cfg.xlat_capslockcyr)
|
||||||
keystate[VK_CAPITAL] = 0;
|
keystate[VK_CAPITAL] = 0;
|
||||||
|
|
||||||
r = ToAscii (wParam, scan, keystate, keys, 0);
|
r = ToAsciiEx(wParam, scan, keystate, keys, 0, kbd_layout);
|
||||||
if(r>0)
|
if(r>0)
|
||||||
{
|
{
|
||||||
p = output;
|
p = output;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user