Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P4
-
Resolution: Not an Issue
-
Affects Version/s: fx2.1
-
Fix Version/s: None
-
Component/s: javafx
-
Environment:
WXP, JFX 2.1b14
-
Subcomponent:
Description
Creating a key binding to the keyboard plus key does not work:
KEY_BINDINGS.add( new KeyBinding(KeyCode.PLUS, EVENT_NEXT) );
More closely examining the problem it turns out that the "+" key, being accessed by "SHIFT =" is being, returned as two separate events; one for SHIFT and one for EQUALS
this.setOnKeyPressed(new EventHandler<KeyEvent>()
{
@Override public void handle(KeyEvent t)
{
System.out.println("code=" + t.getCode() + ", text=" + t.getText());
}
});
code=SHIFT, text=
code=EQUALS, text=+
Note that the text correctly returns "+". Something does not seem to be right there.
KEY_BINDINGS.add( new KeyBinding(KeyCode.PLUS, EVENT_NEXT) );
More closely examining the problem it turns out that the "+" key, being accessed by "SHIFT =" is being, returned as two separate events; one for SHIFT and one for EQUALS
this.setOnKeyPressed(new EventHandler<KeyEvent>()
{
@Override public void handle(KeyEvent t)
{
System.out.println("code=" + t.getCode() + ", text=" + t.getText());
}
});
code=SHIFT, text=
code=EQUALS, text=+
Note that the text correctly returns "+". Something does not seem to be right there.