Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » M1+Q or M1+Z don't call respective handler
M1+Q or M1+Z don't call respective handler [message #1835275] Sun, 29 November 2020 17:59 Go to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Hi,
I'm struggling with 2 keybindings on macOS with e4 + JavaFX.

I setup M1+Q to call my ExitHandler and M1+Z to call my UndoHandler.

M1+Q quits the app but without calling the handler :-(

If I replace M1+Q by M1+F it works fine, my handler is really called.

For M1+Z nothing happens at all, if I replace Z by U, it works fines.

Both keybinding sequences seem to be" eaten" by another behavior.

Does anyone have an idea of which layer is overriding these sequences ?

Thanks,
Stéphane.
Re: M1+Q or M1+Z don't call respective handler [message #1835372 is a reply to message #1835275] Tue, 01 December 2020 20:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
on M1+Q: As this is a native callback I think this command does not even reach us?
on M1+Z: So what keyboard layout (from your name I guess you have a french layout, right?) - the this is a JavaFX bug you can try in a simple JavaFX application and see what key you really get. On my german layout it is Y because Z and Y exchanged on my keyboard - I've reported a long time ago
Re: M1+Q or M1+Z don't call respective handler [message #1835418 is a reply to message #1835372] Wed, 02 December 2020 20:25 Go to previous messageGo to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Thomas Schindl wrote on Tue, 01 December 2020 21:22
on M1+Q: As this is a native callback I think this command does not even reach us?
on M1+Z: So what keyboard layout (from your name I guess you have a french layout, right?) - the this is a JavaFX bug you can try in a simple JavaFX application and see what key you really get. On my german layout it is Y because Z and Y exchanged on my keyboard - I've reported a long time ago


Hi Tom, thanks a lot for your answer.

M1+Q fixed by injecting an IWindowCloseHandler in the context from protected void preLifecycle(IEclipseContext appContext) my class extending E4MainThreadApplication. This handler is called from DefWindowRenderer that registers its own handler on stage.setOnCloseRequest().

Yes you're right, I have a french layout mac keyboard i.e azerty layout.

M1+z --> got a w instead of z. Then i've changed the definition in Application.e4xmi and it now works with the 'z' key :-)

I will see to inject this keybinding from code if runtime platform is mac.

Thanks for your help.



Re: M1+Q or M1+Z don't call respective handler [message #1836746 is a reply to message #1835418] Wed, 13 January 2021 09:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
you can adjust the model as part of a processor you contribute through the model-extension points, using an addon might not work as the model might already have been analyzed by othern addons
Re: M1+Q or M1+Z don't call respective handler [message #1836784 is a reply to message #1836746] Wed, 13 January 2021 20:06 Go to previous messageGo to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Hi,
To override M1+Z :
In fact, I provided a LifeCycleURI class through plugin.xml of my app as a property of my product extension-point.
In that class, I implemented a method: @ProcessAdditions void buildApplicationModel(final MApplication application) in which if platform is macOS, I replaced the sequenceKey M1+Z by M1+W for keybindings defined in Application.e4xmi file.
With that 'command' key + Z works, even if the displayed key binding in related Menu Item displays 'command' key + W.
Maybe, one day JavaFX will fixed that.
Re: M1+Q or M1+Z don't call respective handler [message #1837410 is a reply to message #1836784] Fri, 29 January 2021 14:28 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
just finish that thread the OpenJFX-Ticket is https://bugs.openjdk.java.net/browse/JDK-8150709
Previous Topic:java.lang.ExceptionInInitializerError at javafx.scene.web.WebEngine.<clinit>(WebEngine.java:3
Next Topic:Error when trying to inspect e4 apps with Scenic View
Goto Forum:
  


Current Time: Fri Apr 19 21:25:26 GMT 2024

Powered by FUDForum. Page generated in 0.03135 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top