summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2016-03-22 22:14:51 +0100
committerAndras Timar <andras.timar@collabora.com>2016-06-11 13:15:32 +0200
commitfebb907d5d80d6727542ca049ee8f3632d0c891b (patch)
tree41e7885485f10cb7d5345cb8f059d2cc0001327f /vcl
parente0b3d1f1ee9fa315e3daf78c78e54c6681b93930 (diff)
Revert "tdf#95761 All Hotkeys with CTRL+ALT+ not worked"
This reverts commit 5deedec2ab708b841d0d696c8039c7fbcd4e62a7. It is a bad idea to use Ctrl+Alt accelerator keys. It fixes tdf#97908. (cherry picked from commit df00c67da8e8701179dbe66efa00e4a795d51700)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/window/salframe.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index fa5357226ffb..ea2abb20feb8 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -3399,10 +3399,8 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
nModCode |= KEY_SHIFT;
if ( GetKeyState( VK_CONTROL ) & 0x8000 )
nModCode |= KEY_MOD1;
- if ( GetKeyState( VK_LMENU ) & 0x8000 )
+ if ( GetKeyState( VK_MENU ) & 0x8000 )
nModCode |= KEY_MOD2;
- if ( GetKeyState( VK_RMENU ) & 0x8000 ) // this is the ALTGR-Key in this case
- nModCode &= ~KEY_MOD1; // remove the Control flag
if ( (nMsg == WM_CHAR) || (nMsg == WM_SYSCHAR) )
{
@@ -3609,6 +3607,13 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
aKeyEvt.mnCode |= nModCode;
aKeyEvt.mnRepeat = nRepeat;
+ if( (nModCode & (KEY_MOD1|KEY_MOD2)) == (KEY_MOD1|KEY_MOD2) &&
+ aKeyEvt.mnCharCode )
+ {
+ // this is actually AltGr and should not be handled as Alt
+ aKeyEvt.mnCode &= ~(KEY_MOD1|KEY_MOD2);
+ }
+
bIgnoreCharMsg = bCharPeek ? TRUE : FALSE;
long nRet = pFrame->CallCallback( nEvent, &aKeyEvt );
// independent part only reacts on keyup but Windows does not send