When the B_COMMAND key is pressed, the event will not be forwarded to the target

handler anymore, no matter if a shortcut existed or not.
This fixes bug #498.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17883 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-06-20 15:20:18 +00:00
parent 1f11178f97
commit 8ebbfab333
+12 -1
View File
@@ -2956,6 +2956,15 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
}
/*!
Handles keyboard input before it gets forwarded to the target handler.
This includes shortcut evaluation, keyboard navigation, etc.
\return handled if true, the event was already handled, and will not
be forwarded to the target handler.
TODO: must also convert the incoming key to the font encoding of the target
*/
bool
BWindow::_HandleKeyDown(char key, uint32 modifiers)
{
@@ -3033,8 +3042,10 @@ BWindow::_HandleKeyDown(char key, uint32 modifiers)
}
}
return true;
}
// we always eat the event if the command key was pressed
return true;
}
// TODO: convert keys to the encoding of the target view