^X on MacOSX Qt

Add Michael's fix for control+x.

The enum name of the argument suggests that option+x should have
been sending control characters but that wasn't the case for me.

Before this fix, both control+x and option+x behaved like dead
keys, not transmitting anything for nethack to use.  After this
fix, control+x sends ^X as desired but option+x is still dead.
This commit is contained in:
PatR
2020-08-05 11:26:25 -07:00
parent be3edcd097
commit f4cee951ca
2 changed files with 7 additions and 1 deletions

View File

@@ -520,6 +520,11 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
QCoreApplication::setOrganizationName("The NetHack DevTeam");
QCoreApplication::setOrganizationDomain("nethack.org");
QCoreApplication::setApplicationName("NetHack");
#ifdef MACOSX
/* without this, neither control+x nor option+x do anything;
with it, control+x is ^X and option+x still does nothing */
QCoreApplication::setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
#endif
setWindowTitle("Qt NetHack");
if ( qt_compact_mode )