]> granicus.if.org Git - nethack/commitdiff
(from Yitzhak) ALT-H
authornethack.allison <nethack.allison>
Sun, 17 Mar 2002 17:03:45 +0000 (17:03 +0000)
committernethack.allison <nethack.allison>
Sun, 17 Mar 2002 17:03:45 +0000 (17:03 +0000)
This patch disables ALT-H in NetHack mode.  Before patch: ALT-H in NetHack
mode brings down the Help menu in the menu bar.  After patch: ALT-H does
nothing in NetHack mode.  In both cases, in Windows mode, ALT-H brings
down the Help menu in the menu bar.   I can easily write a patch to have
ALT-H in NetHack mode act the same as '?'.

Explanation:
return 0: this window proc has processed this event.
return DefWindowProc(): process using default window proc.

ALT-H is the only key for which DefWindowProc() does something special AND
reaches the else.

win/win32/mhmain.c

index 71c5ff82461757c095f04deb1aa466c71c116eb1..c6b436a53ff7ea8c5af4ec0bd13b8005f105930f 100644 (file)
@@ -386,8 +386,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
                    NHEVENT_KBD(M(tolower(c)));
                } else if (scancode == (SCANLO + SIZE(scanmap)) - 1) {
                    NHEVENT_KBD(M('?'));
-               } else
-                   return DefWindowProc(hWnd, message, wParam, lParam);
+               }
                return 0;
             }
             return DefWindowProc(hWnd, message, wParam, lParam);