diff options
author | Sven Gothel <[email protected]> | 2013-04-08 23:04:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-04-08 23:04:49 +0200 |
commit | 09ebc2cd6fdd317134f0afb38174418a6d067d65 (patch) | |
tree | 382bcb5b7d97f547de224f710319621f726d373a | |
parent | d2fc229b844942646fd9a32fc943923a5770a4be (diff) |
Bug 641 NEWT: Refine definition of keySym, i.e. for printable keys, keySym is the 'unshifted' UTF-16 char value ; Add isPrintable() to toString().
-rw-r--r-- | src/newt/classes/com/jogamp/newt/event/KeyEvent.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java index a3613fe2e..bda60004e 100644 --- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java @@ -112,6 +112,11 @@ public class KeyEvent extends InputEvent /** * Returns the virtual <i>key symbol</i> reflecting the current <i>keyboard layout</i>. + * <p> + * For {@link #isPrintableKey() printable keys}, the <i>key symbol</i> is the unshifted + * representation of the {@link #getKeyChar() UTF-16 key char}. + * </p> + * @see #isPrintableKey() * @see #getKeyChar() * @see #getKeyCode() */ @@ -151,7 +156,7 @@ public class KeyEvent extends InputEvent sb = new StringBuilder(); } sb.append("KeyEvent[").append(getEventTypeString(getEventType())).append(", code ").append(toHexString(keyCode)).append(", sym ").append(toHexString(keySym)).append(", char '").append(keyChar).append("' (").append(toHexString((short)keyChar)) - .append("), isModifierKey ").append(isModifierKey()).append(", isActionKey ").append(isActionKey()).append(", "); + .append("), printable ").append(isPrintableKey()).append(", modifier ").append(isModifierKey()).append(", action ").append(isActionKey()).append(", "); return super.toString(sb).append("]"); } |