cfg.height = rows;
old_fwidth = font_width;
old_fheight = font_height;
+ GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle));
if (!do_reconfig(hwnd))
break;
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SWP_NOMOVE | SWP_NOZORDER);
}
+ set_title(cfg.wintitle);
if (IsIconic(hwnd)) {
SetWindowText (hwnd,
cfg.win_name_always ? window_name : icon_name);
int scan, left_alt = 0, key_down, shift_state;
int r, i, code;
unsigned char * p = output;
+ static int alt_state = 0;
+
+ HKL kbd_layout = GetKeyboardLayout(0);
static WORD keys[3];
static int compose_char = 0;
static WPARAM compose_key = 0;
-
+
r = GetKeyboardState(keystate);
if (!r) memset(keystate, 0, sizeof(keystate));
else
debug(("*"));
debug((", S%02x", scan=(HIWORD(lParam) & 0xFF) ));
- ch = MapVirtualKey(wParam, 2);
+ ch = MapVirtualKeyEx(wParam, 2, kbd_layout);
if (ch>=' ' && ch<='~') debug((", '%c'", ch));
else if (ch) debug((", $%02x", ch));
return -1;
}
if (left_alt && wParam == VK_SPACE && cfg.alt_space) {
+ alt_state = 0;
PostMessage(hwnd, WM_CHAR, ' ', 0);
SendMessage (hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0);
return -1;
if(cfg.xlat_capslockcyr)
keystate[VK_CAPITAL] = 0;
- r = ToAscii (wParam, scan, keystate, keys, 0);
+ r = ToAsciiEx(wParam, scan, keystate, keys, 0, kbd_layout);
if(r>0)
{
p = output;
/* ALT alone may or may not want to bring up the System menu */
if (wParam == VK_MENU) {
if (cfg.alt_only) {
- static int alt_state = 0;
if (message == WM_SYSKEYDOWN)
alt_state = 1;
else if (message == WM_SYSKEYUP && alt_state)