diff options
author | Manfred Blume <manfred.blume@cib.de> | 2017-11-16 13:55:26 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-11-17 16:00:43 +0100 |
commit | f53b3b547b04dc112076d8323b5b24ae178d6260 (patch) | |
tree | 4de7fa9f349ee0b2e9067d36e85b414ddbbd2b6d /vcl/win | |
parent | e8871a5ec9fc9b58ee688c9f1d9b22223769ea57 (diff) |
revert "tdf#95761 All Hotkeys with CTRL+ALT+ not worked"
This was breaking keyboard functions in other locales, by essentially
disabling use of left Ctrl-Alt as AltGr equivalent - fixes tdf#97908
This reverts commit 3ac9942c624cb627c8b09122498b45b05cf455f6
Change-Id: Ibee8cf0cb663f1995d0696afde8baea995f35f37
Reviewed-on: https://gerrit.libreoffice.org/44824
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/window/salframe.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 83c96b69c15c..0715c88f33c0 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -3360,10 +3360,8 @@ static bool 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) ) { @@ -3567,6 +3565,13 @@ static bool 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; bool nRet = pFrame->CallCallback( nEvent, &aKeyEvt ); // independent part only reacts on keyup but Windows does not send |