summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/win/window/salframe.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 42baae8ef715..7c234c5dd3e9 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3375,10 +3375,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) )
{
@@ -3585,6 +3583,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