Qt: ^V on OSX
I can't take credit for this and still have no idea why it is needed, but it fixes use of ^V as a command and as input to to the regular version of yn_function(). In particular, '&' command reports it as ^V. Unfortunately when 'popup_dialog' is set, no control characters seem to be accepted by the part of NetHackQtYnDialog(Exec+KeyPressEvent) responsible for arbitrary input. It also causes getlin() to terminate but I can't think of any situation where ^V would be considered to be valid input for getlin() so won't worry about that. I put it in as '#if MACOSX' because I don't know whether any other Qt platforms need it.
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
// [Used in qt_bind.cpp and qt_main.cpp, but not referenced in qt_stat.cpp.]
|
||||
#define DYNAMIC_STATUSLINES
|
||||
|
||||
// NetHackQtBind::notify() doesn't see ^V on OSX
|
||||
#ifdef MACOSX
|
||||
#define CTRL_V_HACK
|
||||
#endif
|
||||
|
||||
namespace nethack_qt_ {
|
||||
|
||||
class NetHackQtInvUsageWindow;
|
||||
@@ -83,6 +88,9 @@ private slots:
|
||||
void zoomMap();
|
||||
void raiseMessages();
|
||||
void raiseStatus();
|
||||
#ifdef CTRL_V_HACK
|
||||
void CtrlV();
|
||||
#endif
|
||||
|
||||
private:
|
||||
void ShowIfReady();
|
||||
|
||||
Reference in New Issue
Block a user