CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, \
FIXED_PITCH | FF_DONTCARE, cfg.font)
if (cfg.vtmode != VT_OEMONLY) {
- f(FONT_NORMAL, ANSI_CHARSET, fw_dontcare, FALSE);
- f(FONT_UNDERLINE, ANSI_CHARSET, fw_dontcare, TRUE);
+ f(FONT_NORMAL, cfg.fontcharset, fw_dontcare, FALSE);
+ f(FONT_UNDERLINE, cfg.fontcharset, fw_dontcare, TRUE);
}
if (cfg.vtmode == VT_OEMANSI || cfg.vtmode == VT_OEMONLY) {
f(FONT_OEM, OEM_CHARSET, fw_dontcare, FALSE);
}
if (bold_mode == BOLD_FONT) {
if (cfg.vtmode != VT_OEMONLY) {
- f(FONT_BOLD, ANSI_CHARSET, fw_bold, FALSE);
- f(FONT_BOLDUND, ANSI_CHARSET, fw_bold, TRUE);
+ f(FONT_BOLD, cfg.fontcharset, fw_bold, FALSE);
+ f(FONT_BOLDUND, cfg.fontcharset, fw_bold, TRUE);
}
if (cfg.vtmode == VT_OEMANSI || cfg.vtmode == VT_OEMONLY) {
f(FONT_OEMBOLD, OEM_CHARSET, fw_bold, FALSE);
case WM_CREATE:
break;
case WM_CLOSE:
- if (MessageBox(hwnd, "Are you sure you want to close this session?",
+ if (!cfg.warn_on_close ||
+ MessageBox(hwnd, "Are you sure you want to close this session?",
"PuTTY Exit Confirmation",
MB_ICONWARNING | MB_OKCANCEL) == IDOK)
DestroyWindow(hwnd);
* we're ready to cope.
*/
{
- char c = wParam;
+ char c = xlat_kbd2tty((unsigned char)wParam);
back->send (&c, 1);
}
return 0;
*/
if (ret) {
WORD chr;
- int r = ToAscii (wParam, (lParam >> 16) & 0xFF,
- keystate, &chr, 0);
+ int r;
+ BOOL capsOn=keystate[VK_CAPITAL] !=0;
+
+ /* helg: clear CAPS LOCK state if caps lock switches to cyrillic */
+ if(cfg.xlat_capslockcyr)
+ keystate[VK_CAPITAL] = 0;
+
+ r = ToAscii (wParam, (lParam >> 16) & 0xFF,
+ keystate, &chr, 0);
+
+ if(capsOn)
+ chr = xlat_latkbd2win((unsigned char)(chr & 0xFF));
if (r == 1) {
- *p++ = chr & 0xFF;
+ *p++ = xlat_kbd2tty((unsigned char)(chr & 0xFF));
return p - output;
}
}