summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Hartmann <gh@openoffice.org>2002-11-27 13:03:26 +0000
committerGregor Hartmann <gh@openoffice.org>2002-11-27 13:03:26 +0000
commit6da26523364dc0f1f00f025db93996888ac89cc9 (patch)
tree4864ab35f22ebd1404590870960a9280b52b0270
parent83cc0dcd21c9ea065ffff848eea18bea34cc29ef (diff)
#105557# allow <SHIFT F10> to open contextmenu
-rw-r--r--automation/source/server/sta_list.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx
index 9ef018d42bd0..294e6e019801 100644
--- a/automation/source/server/sta_list.cxx
+++ b/automation/source/server/sta_list.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sta_list.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: gh $ $Date: 2002-11-27 12:37:52 $
+ * last change: $Author: gh $ $Date: 2002-11-27 14:03:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -957,7 +957,22 @@ void StatementList::DirectLog(ULONG nUId, String aMessage)
void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt )
{
if ( !Application::CallAccel( aKEvnt.GetKeyCode() ) )
+ {
CALL_EVENT_WITH_NOTIFY( EVENT_KEYINPUT, aKEvnt, pWin, KeyInput )
+
+ KeyCode aCode = aKEvnt.GetKeyCode();
+ if ( (aCode.GetCode() == KEY_CONTEXTMENU) || ((aCode.GetCode() == KEY_F10) && aCode.IsShift()) )
+ {
+ Point aPos;
+ // simulate mouseposition at center of window
+ Size aSize = pWin->GetOutputSize();
+ aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
+
+ CommandEvent aEvent( aPos, COMMAND_CONTEXTMENU, FALSE );
+ ImplCommand( pWin, aEvent );
+ }
+ }
+
CALL_EVENT_WITH_NOTIFY( EVENT_KEYUP, aKEvnt, pWin, KeyUp )
};