KeyCombination cmdMinus = new Key*Code*Combination(KeyCode.MINUS,
KeyCombination.CONTROL_DOWN);
KeyCombination cmdMinusFromCharacter = new Key*Character*Combination(-,
KeyCombination.CONTROL_DOWN);
Using the above like this:
scene.getAccelerators().put(cmdMinus, runnable);
It seems to me that this is working as designed. You have created two
different KeyCombinations and asked that both fire your runnable.
Further, both of the KeyCombinations match your key input since both a
KeyPressed and a KeyTyped event are sent when pressing a key that has an
associated
What is very interesting about this is that I can't duplicate it with the
+ character.
I've added all of the following to the scene accelerators and it still only
fires my plus action once for each press.
KeyCombination cmdPlus = new KeyCodeCombination(KeyCode.PLUS,
KeyCombination.CONTROL_DOWN);
Hi Markus,
We have updated the OpenJFX Wiki to point to the right URL for the
JavaFX forum:
https://community.oracle.com/community/java/javafx/javafx_2.0_and_later
Thank you for reporting the problem so we could fix it.
-- Kevin
Stephen F Northover wrote:
This is a good place to ask
This does seem somewhat strange. Do you get multiple calls to your
runnable if you use a KeyCharacter combination and KeyCode combination
for CTRL-a or other key that generates a key char without needing a shift?
-- Kevin
Scott Palmer wrote:
What is very interesting about this is that I
Hi Scott,
On Fri, Sep 26, 2014 at 7:01 PM, Scott Palmer swpal...@gmail.com wrote:
Note: With the second combination above I really wanted something that
worked for both MINUS and SUBTRACT simultaneously - since they both type
the same Character and only one accelerator can be set on a
I am only seeing the runnable fired once in FX 8u40.
Steve
Steps:
1) Run TestKeyCombination
2) Press Control+-
Here is the test code:
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import
Is this on a Mac or on Windows? I just ran your test case and I get two
runnables, which is what I would expect.
-- Kevin
Stephen F Northover wrote:
I am only seeing the runnable fired once in FX 8u40.
Steve
Steps:
1) Run TestKeyCombination
2) Press Control+-
Here is the test code:
Hi Kevin,
On Fri, Sep 26, 2014 at 7:16 PM, Kevin Rushforth
kevin.rushfo...@oracle.com wrote:
It seems to me that this is working as designed. You have created two
different KeyCombinations and asked that both fire your runnable. Further,
both of the KeyCombinations match your key input since
This is on Mac. Will try Windows.
Steve
On 2014-09-26, 1:24 PM, Kevin Rushforth wrote:
Is this on a Mac or on Windows? I just ran your test case and I get
two runnables, which is what I would expect.
-- Kevin
Stephen F Northover wrote:
I am only seeing the runnable fired once in FX
I'm on Windows 7.
On Fri, Sep 26, 2014 at 1:25 PM, Stephen F Northover
steve.x.northo...@oracle.com wrote:
This is on Mac. Will try Windows.
Steve
On 2014-09-26, 1:24 PM, Kevin Rushforth wrote:
Is this on a Mac or on Windows? I just ran your test case and I get two
runnables, which
Forgot to include the list.
(I'm testing with 8u20 btw)
-- Forwarded message --
From: Scott Palmer swpal...@gmail.com
Date: Fri, Sep 26, 2014 at 1:25 PM
Subject: Re: Accelerators - odd behavior
To: Kevin Rushforth kevin.rushfo...@oracle.com
Yes, for CTRL+a I do see it fire
The explanation could be that on some systems the
KeyCharacterCombination(-).match picks the same key code as the one
produced by key press (e.g. MINUS), while on other systems it picks
the other one (SUBTRACT).
On Fri, Sep 26, 2014 at 7:24 PM, Kevin Rushforth
kevin.rushfo...@oracle.com wrote:
While we are on the subject... Why does a Scene accelerator Map take
runnables instead of EventHandlers ?
Scott
On Fri, Sep 26, 2014 at 1:27 PM, Scott Palmer swpal...@gmail.com wrote:
Forgot to include the list.
(I'm testing with 8u20 btw)
-- Forwarded message --
From:
This means that the method can return true only for KEY_PRESSED
andKEY_RELEASED events, but not for KEY_TYPED events, which don't have
valid key codes.
Ah, I missed that. I would expect such a disclaimer for
KeyCodeCombination but not for KeyTypedCombination. In any case, it
still seems
That would imply that 8u40 is broken (where '-' only fired once for
Stephen), or it's broken for the + key.
Scott
On Fri, Sep 26, 2014 at 1:29 PM, Kevin Rushforth kevin.rushfo...@oracle.com
wrote:
This means that the method can return true only for KEY_PRESSED
andKEY_RELEASED events, but
Attached my test case...
On Fri, Sep 26, 2014 at 1:31 PM, Scott Palmer swpal...@gmail.com wrote:
That would imply that 8u40 is broken (where '-' only fired once for
Stephen), or it's broken for the + key.
Scott
On Fri, Sep 26, 2014 at 1:29 PM, Kevin Rushforth
kevin.rushfo...@oracle.com
Two on Windows, one on Mac. See
https://javafx-jira.kenai.com/browse/RT-38830
Steve
On 2014-09-26, 1:25 PM, Stephen F Northover wrote:
This is on Mac. Will try Windows.
Steve
On 2014-09-26, 1:24 PM, Kevin Rushforth wrote:
Is this on a Mac or on Windows? I just ran your test case and I
Okay.. so what is going on with Windows and CTRL+PLUS ?
Scott
On Fri, Sep 26, 2014 at 1:35 PM, Stephen F Northover
steve.x.northo...@oracle.com wrote:
Two on Windows, one on Mac. See https://javafx-jira.kenai.com/
browse/RT-38830
Steve
On 2014-09-26, 1:25 PM, Stephen F Northover wrote:
It may or may not be a bug, but it will be good to investigate.
-- Kevin
Stephen F Northover wrote:
Two on Windows, one on Mac. See
https://javafx-jira.kenai.com/browse/RT-38830
Steve
On 2014-09-26, 1:25 PM, Stephen F Northover wrote:
This is on Mac. Will try Windows.
Steve
On
Why does a Scene accelerator Map take runnables instead of
EventHandlers ?
That's a good question. It's been that way since it was initially
introduced in FX 2.0, and it seems at odds with the way other events are
handled.
-- Kevin
Scott Palmer wrote:
While we are on the subject...
Agree. Suggest that we move the discussion to the JIRA to capture the
background information for whoever will address the bug.
Steve
On 2014-09-26, 1:41 PM, Kevin Rushforth wrote:
It may or may not be a bug, but it will be good to investigate.
-- Kevin
Stephen F Northover wrote:
Two on
What started all this was that I sued CTRL +/- to zoom in and out in my
app. People found that one press to zoom out needed two presses to zoom
back in.
If the behavior is platform-specific it will be awkward to deal with.
Specially since I want it to work with the numeric keypad as well.. so I
Please attach the test case I mailed earlier to the JIRA issue.
On Fri, Sep 26, 2014 at 1:42 PM, Stephen F Northover
steve.x.northo...@oracle.com wrote:
Agree. Suggest that we move the discussion to the JIRA to capture the
background information for whoever will address the bug.
Steve
The cause of the problem seems clear to me. This is what I observe on
my (Linux) system.
Pressing '-' on the main part of the keyboard produces MINUS key code
pressed. Pressing '-' on the numeric keypad produces SUBTRACT key code
pressed.
KeyCharacterCombination(-) matches MINUS pressed, but
Here is a possible solution to Scott's original problem:
KeyCombination CtrlMinus = new KeyCombination(CONTROL_DOWN) {
@Override
public boolean match(KeyEvent event) {
return super.match(event)
event.getEventType() == KEY_PRESSED
Reminder, Monday is our weekly sanity testing. We will be light this
week due to JavaOne, but if you are not attending the conference please
do your sanity testing :)
You can find your testing assignment at:
https://wiki.openjdk.java.net/display/OpenJFX/Sanity+Testing
Also please remember
I should note that KeyCodeCombintation(KeyCode.EQUALS,
KeyCombination.CONTROL_DOWN, KeyCombination.SHIFT_DOWN)
is undesirable as it requires knowledge of the keyboard layout that
shouldn't be required.
On Fri, Sep 26, 2014 at 6:58 PM, Scott Palmer swpal...@gmail.com wrote:
While looking into
28 matches
Mail list logo