New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FX - Make key events little bit more sane #3686

Merged
merged 1 commit into from Aug 21, 2015

Conversation

Projects
None yet
2 participants
@JakubValtar
Contributor

JakubValtar commented Aug 21, 2015

Make key events behave similar to Java2D.

Returned key chars in pressed/released events are always uppercase, but keyCodes are correct.
Key typed events give correct key char, but zero keyCode.

All non-alphanumeric keys I could find on my keyboard now return key char PConstants.CODED.

benfry added a commit that referenced this pull request Aug 21, 2015

Merge pull request #3686 from JakubValtar/fx-keytyped
FX - Make key events little bit more sane

@benfry benfry merged commit 57d3ed5 into processing:master Aug 21, 2015

// Are they f*ing serious?
char key;
if (et == KeyEvent.KEY_TYPED) {
key = fxEvent.getCharacter().charAt(0);

This comment has been minimized.

@benfry

benfry Aug 21, 2015

Member

I did get an ArrayIndexOutOfBoundsException on this line earlier today (I think I hit ESC to close a sketch), in case that's not fixed in this commit.

@benfry

benfry Aug 21, 2015

Member

I did get an ArrayIndexOutOfBoundsException on this line earlier today (I think I hit ESC to close a sketch), in case that's not fixed in this commit.

@JakubValtar JakubValtar deleted the JakubValtar:fx-keytyped branch Aug 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment