/* Note if AltGr was pressed and if it was used as a compose key */
if (!compose_state) {
- compose_key = -1;
+ compose_key = 0x100;
if (cfg.compose_key) {
if (wParam == VK_MENU && (HIWORD(lParam)&KF_EXTENDED))
compose_key = wParam;
return p-output;
}
+ /* If we're definitly not building up an ALT-54321 then clear it */
+ if (!left_alt) keys[0] = 0;
}
/* ALT alone may or may not want to bring up the System menu */
* Beep.
*/
void beep(int mode) {
- if (mode == 1)
+ if (mode == BELL_DEFAULT) {
MessageBeep(MB_OK);
+ } else if (mode == BELL_WAVEFILE) {
+ if (!PlaySound(cfg.bell_wavefile, NULL, SND_ASYNC | SND_FILENAME)) {
+ char buf[sizeof(cfg.bell_wavefile)+80];
+ sprintf(buf, "Unable to play sound file\n%s\n"
+ "Using default sound instead", cfg.bell_wavefile);
+ MessageBox(hwnd, buf, "PuTTY Sound Error", MB_OK | MB_ICONEXCLAMATION);
+ cfg.beep = BELL_DEFAULT;
+ }
+ }
}