Ignore Alt-key navigation to menubar, as it's annoying when you
use Alt-Direction to move around.
This commit is contained in:
@@ -4981,6 +4981,11 @@ void NetHackQtBind::qt_outrip(winid wid, int how)
|
|||||||
|
|
||||||
bool NetHackQtBind::notify(QObject *receiver, QEvent *event)
|
bool NetHackQtBind::notify(QObject *receiver, QEvent *event)
|
||||||
{
|
{
|
||||||
|
// Ignore Alt-key navigation to menubar, it's annoying when you
|
||||||
|
// use Alt-Direction to move around.
|
||||||
|
if ( main && event->type()==QEvent::KeyRelease && main==receiver )
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
bool result=QApplication::notify(receiver,event);
|
bool result=QApplication::notify(receiver,event);
|
||||||
if (event->type()==QEvent::KeyPress) {
|
if (event->type()==QEvent::KeyPress) {
|
||||||
QKeyEvent* key_event=(QKeyEvent*)event;
|
QKeyEvent* key_event=(QKeyEvent*)event;
|
||||||
|
|||||||
Reference in New Issue
Block a user