JDK-6183805 : ActionEvent.getModifiers does not return correct value for shift modifier
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2,5.0,6,9,11,17,21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: solaris_10,windows_7,windows_8
  • CPU: x86,sparc,x86_64
  • Submitted: 2004-10-25
  • Updated: 2025-06-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
ActionEvent.getModifiers does not return the correct value for shift + left mouse click on Button. The value returned by call to ActionEvent.getModifiers does not include ActionEvent.SHIFT_MASK modifier. This is reproducible with tiger and mustang.

Steps to reproduce:
1. Compile and run the attached code. 
2. Click on the button with shift key pressed and see the terminal window for output.

The testcase checks for ActionEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK. 
1. On Motif Toolkit, check for InputEvent.SHIFT_DOWN_MASK returns true and  ActionEvent.SHIFT_MASK returns false.
2. On XToolkit, check for InputEvent.SHIFT_DOWN_MASK returns false and ActionEvent.SHIFT_MASK returns true.
3. On Windows, check for InputEvent.SHIFT_DOWN_MASK returns true and ActionEvent.SHIFT_MASK returns false.
###@###.### 10/25/04 13:07 GMT

Comments
EVALUATION Should see how XAWT generates Actions and correct these invocations with correct arguments. Suspect that this is a Component-specific behaviour. Refer to 6191390 which concerns with List on Win32. It also might be a button peer problem. ###@###.### 2005-05-31 13:22:09 GMT
31-05-2005