The Qt menu entries which were executing nethack's help command (the '?' menu) were doing so because their command keystroke was a meta-character and such characters are being converted to '?' to indicate an error in conversion to Latin1 character set. The old Qt3 code didn't perform any such conversion. This fix feels fragile because there are two different places deciding how to disambiguate partial extended commands (the code for Qt's '#' handling and a new routine in the core). Qt menus now send '#' and enough letters to satisfy '#' handling for any command which uses M-c or has no regular keystroke nor M-c one. (If it were to send the full extended command name, the letters after the unambiguous prefix would be left in the input queue to be processed as subsequent commands.) There is a fundamental problem that this doesn't address: if the player uses BIND directives in the run-time config file, the Qt menu bindings will break unless the BINDs are all done before selecting windowtype. Qt's menu bindings translate a click on a menu entry into the keystroke used to invoke the corresponding command, so using BIND to change that after the menus are set up will result in the wrong commands being executed.
118 KiB
118 KiB