Commit ec188370 authored by Robert Knight's avatar Robert Knight
Browse files

Allow a press and release of the Alt key on its own to be used to focus the menu bar.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=679105
parent 2a110919
......@@ -2399,9 +2399,16 @@ bool TerminalDisplay::event( QEvent *e )
QKeyEvent* keyEvent = static_cast<QKeyEvent *>( e );
int keyCode = keyEvent->key() | keyEvent->modifiers();
// a check to see if keyEvent->text() is empty is used
// to avoid intercepting the press of the modifier key on its own.
// this is important as it allows a press and release of the Alt key
// on its own to focus the menu bar, making it possible to
// work with the menu without using the mouse
if ( !standalone() &&
( (keyEvent->modifiers() == Qt::ControlModifier) ||
(keyEvent->modifiers() == Qt::AltModifier) ) )
(keyEvent->modifiers() == Qt::AltModifier) ) &&
!keyEvent->text().isEmpty() )
return true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment