From: nethack.allison Date: Sun, 17 Mar 2002 17:03:45 +0000 (+0000) Subject: (from Yitzhak) ALT-H X-Git-Tag: MOVE2GIT~2952 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=855e6eef880ff0ca6e376a1cb15e4915e1c50214;p=nethack (from Yitzhak) ALT-H 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. --- diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 71c5ff824..c6b436a53 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -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);