RFR: JDK-8302618: [macOS] Problem typing uppercase letters with java.awt.Robot when moving mouse [v5]
Sergey Bylokhov
serb at openjdk.org
Mon Jul 17 20:29:04 UTC 2023
On Tue, 11 Jul 2023 18:13:05 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m line 135:
>>
>>> 133: if ((initFlags & kCGEventFlagMaskSecondaryFn) != 0) {
>>> 134: initFlags ^= kCGEventFlagMaskSecondaryFn;
>>> 135: }
>>
>> Can you please double check how the lines below affected the usecase you fix, especially:
>>> CGEnableEventStateCombining - Pass true to specify that the actual key and mouse state are merged with the application-specified state in a synthetic event; otherwise, pass false.
>
> @mrserb I checked by changing `CGEnableEventStateCombining()` to `false` with the updated code and it didn't make any difference. Works the same when I test it with the reproducer. I will check again to see if there is any difference in the final flag bits that is used to post the event.
>
> Did you also mean trying out different options available for the following lines with the original code intact?
>
>
> // Let our event's modifier key state blend with local hardware events
> CGEnableEventStateCombining(TRUE);
>
> // Don't let our events block local hardware events
> CGSetLocalEventsFilterDuringSupressionState(
> kCGEventFilterMaskPermitAllEvents,
> kCGEventSupressionStateSupressionInterval);
>
> CGSetLocalEventsFilterDuringSupressionState(
> kCGEventFilterMaskPermitAllEvents,
> kCGEventSupressionStateRemoteMouseDrag);
>
>
> Apple documentation about [CGEnableEventStateCombining(boolean doCombineState)](https://developer.apple.com/documentation/coregraphics/1541787-cgenableeventstatecombining?language=objc) it states:
>
> _When called with doCombineState equal to false, this function initializes local (per application) state tracking information to a state of all keys, modifiers, and mouse buttons up. When called with doCombineState equal to true, the current global state of keys, modifiers, and mouse buttons are used in generating events._
>
> So I think CGEnableEventStateCombining should be set to TRUE as it is configured now ?
I just interested how this change might affect that props.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14744#discussion_r1265862090
More information about the client-libs-dev
mailing list