--- old/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp 2016-03-28 20:14:08.537634023 +0530 +++ new/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp 2016-03-28 20:14:08.341732023 +0530 @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -2587,6 +2588,27 @@ return java_awt_event_KeyEvent_KEY_LOCATION_LEFT; } +/* Returns Java ActionEvent modifieres. + * When creating ActionEvent, modifiers provided by ActionEvent + * class should be set. + */ +jint +AwtComponent::GetActionModifiers() +{ + jint modifiers = GetJavaModifiers(); + + if (modifiers & java_awt_event_InputEvent_CTRL_DOWN_MASK) { + modifiers |= java_awt_event_ActionEvent_CTRL_MASK; + } + if (modifiers & java_awt_event_InputEvent_SHIFT_DOWN_MASK) { + modifiers |= java_awt_event_ActionEvent_SHIFT_MASK; + } + if (modifiers & java_awt_event_InputEvent_ALT_DOWN_MASK) { + modifiers |= java_awt_event_ActionEvent_ALT_MASK; + } + return modifiers; +} + /* Returns Java extended InputEvent modifieres. * Since ::GetKeyState returns current state and Java modifiers represent * state before event, modifier on changed key are inverted.