<AWT Dev> Review request for 4908075: Press shift and another key using robot does not trigger events properly

Oliver Bendig java at obendig.de
Tue Jun 21 14:39:41 UTC 2016


can you please review the following fix:

Webrev: http://cr.openjdk.java.net/~simonis/webrevs/2016/4908075/
BugID: https://bugs.openjdk.java.net/browse/JDK-4908075

Following some mre details: we are facing issues when trying to send keyboard
events via awt robot. When trying to send a keyboard event from the extended
keys with the SHIFT-key pressed, this doesn't send a correct key combination.
Instead, the Shift-Key is released before the second keycode is sent. This makes
it impossible to send combinations like e.g. shift+delete.

The bug id 4908075 for this issue is rather old. The suggested idea to switch to
SendInput() instead of keybd_event() was delayed at that time because of missing
support in Win98. For testing purposes, I implemented SendInput instead of
keybd_event, but the issue stays the same. The problem seems to be caused by the
missing KEYEVENTF_EXTENDEDKEY flag when calling keybd_event or SendInput. Bug id
8155742 introduces this flag for other reason for VK_ALT_GRAPH. If this is
enhanced to cover the extended keys that were introduced as enhancement of the
old 84 key AT keyboard, the correct key events are sent.

The bug 4908075 was closed as "Won't fix" but I think the fix would be rather
simple. Should I reopen 4908075 or is it better to create a new bug for this

Thank you and best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160621/c2c0d512/attachment.html>

More information about the awt-dev mailing list