//
// keygrabber.cpp - Widget to grab a key and dismiss itself
//
-// by James L. Hammons
+// by James Hammons
// (C) 2011 Underground Software
//
-// JLH = James L. Hammons <jlhamm@acm.org>
+// JLH = James Hammons <jlhamm@acm.org>
//
// Who When What
// --- ---------- -------------------------------------------------------------
mainLayout->addWidget(label);
setLayout(mainLayout);
setWindowTitle(tr("Grab"));
+
+ // Will this make Mac OSX work???
+ setFocusPolicy(Qt::StrongFocus);
}
KeyGrabber::~KeyGrabber()
void KeyGrabber::keyPressEvent(QKeyEvent * e)
{
key = e->key();
- accept();
+
+ // Since this is problematic, we don't allow this key...
+ if (key != Qt::Key_Alt)
+ accept();
}