X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/971bcc0afc69f7e754285167e88885c8893d0229..bf133a73a78d9ea39ff5cd50dfea926253ec021a:/window.c diff --git a/window.c b/window.c index 6d306f56..794efc20 100644 --- a/window.c +++ b/window.c @@ -636,7 +636,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) * Start up the telnet connection. */ { - char *error; + const char *error; char msg[1024], *title; char *realhost; @@ -3537,6 +3537,10 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, *p++ = 0x1C; return p - output; } + if (shift_state == 3 && wParam == 0xDE) { + *p++ = 0x1E; /* Ctrl-~ == Ctrl-^ in xterm at least */ + return p - output; + } if (shift_state == 0 && wParam == VK_RETURN && term->cr_lf_return) { *p++ = '\r'; *p++ = '\n'; @@ -3872,9 +3876,10 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, ldisc_send(ldisc, &ch, 1, 1); } alt_sum = 0; - } else + } else { term_seen_key_event(term); lpage_send(ldisc, kbd_codepage, &ch, 1, 1); + } } else { if(capsOn && ch < 0x80) { WCHAR cbuf[2]; @@ -4406,6 +4411,23 @@ void beep(void *frontend, int mode) MB_OK | MB_ICONEXCLAMATION); cfg.beep = BELL_DEFAULT; } + } else if (mode == BELL_PCSPEAKER) { + static long lastbeep = 0; + long beepdiff; + + beepdiff = GetTickCount() - lastbeep; + if (beepdiff >= 0 && beepdiff < 50) + return; + + /* + * We must beep in different ways depending on whether this + * is a 95-series or NT-series OS. + */ + if(osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) + Beep(800, 100); + else + MessageBeep(-1); + lastbeep = GetTickCount(); } /* Otherwise, either visual bell or disabled; do nothing here */ if (!term->has_focus) {