From bdfb74818aa224bd96a15f232f417e921e0d8f63 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Jun 2013 10:00:23 +0200 Subject: Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent) - Part2: API Documentation and Comments --- .../classes/com/jogamp/newt/event/KeyEvent.java | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/newt/classes/com') diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java index 683a5ca54..ec05a34ad 100644 --- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java @@ -43,9 +43,8 @@ import com.jogamp.common.util.IntBitfield; *

* * - * - * - * + * + * *
#Event Type Constraints Notes
1{@link #EVENT_KEY_PRESSED} excluding {@link #isAutoRepeat() auto-repeat} {@link #isModifierKey() modifier} keys
2{@link #EVENT_KEY_RELEASED} excluding {@link #isAutoRepeat() auto-repeat} {@link #isModifierKey() modifier} keys
3{@link #EVENT_KEY_TYPED} only for {@link #isPrintableKey() printable} and non {@link #isAutoRepeat() auto-repeat} keysDeprecated: Use {@link #EVENT_KEY_RELEASED} and apply constraints.
1{@link #EVENT_KEY_PRESSED} excluding {@link #isAutoRepeat() auto-repeat}-{@link #isModifierKey() modifier} keys
2{@link #EVENT_KEY_RELEASED} excluding {@link #isAutoRepeat() auto-repeat}-{@link #isModifierKey() modifier} keys
*

* In case the native platform does not @@ -58,27 +57,24 @@ import com.jogamp.common.util.IntBitfield; *

* Auto-Repeat shall behave as follow: *

-    P = pressed, R = released, T = typed
+    P = pressed, R = released
     0 = normal, 1 = auto-repeat
 
-    P(0), [ R(1), P(1), R(1), ..], R(0) T(0)    
+    P(0), [ R(1), P(1), R(1), ..], R(0)    
  * 
* The idea is if you mask out auto-repeat in your event listener - * or catch {@link #EVENT_KEY_TYPED typed} events only, - * you just get one long pressed P/R/T triple for {@link #isPrintableKey() printable} keys. - * {@link #isActionKey() Action} keys would produce one long pressed P/R tuple in case you mask out auto-repeat . + * you just get one long pressed P/R tuple for {@link #isPrintableKey() printable} and {@link #isActionKey() Action} keys. *

*

* {@link #isActionKey() Action} keys will produce {@link #EVENT_KEY_PRESSED pressed} * and {@link #EVENT_KEY_RELEASED released} events including {@link #isAutoRepeat() auto-repeat}. *

*

- * {@link #isPrintableKey() Printable} keys will produce {@link #EVENT_KEY_PRESSED pressed}, - * {@link #EVENT_KEY_RELEASED released} and {@link #EVENT_KEY_TYPED typed} events, the latter is excluded for {@link #isAutoRepeat() auto-repeat} events. + * {@link #isPrintableKey() Printable} keys will produce {@link #EVENT_KEY_PRESSED pressed} and {@link #EVENT_KEY_RELEASED released} events. *

*

- * {@link #isModifierKey() Modifier} keys will produce {@link #EVENT_KEY_PRESSED pressed} - * and {@link #EVENT_KEY_RELEASED released} events excluding {@link #isAutoRepeat() auto-repeat}. + * {@link #isModifierKey() Modifier} keys will produce {@link #EVENT_KEY_PRESSED pressed} and {@link #EVENT_KEY_RELEASED released} events + * excluding {@link #isAutoRepeat() auto-repeat}. * They will also influence subsequent event's {@link #getModifiers() modifier} bits while pressed. *

* @@ -360,9 +356,9 @@ public class KeyEvent extends InputEvent private static final byte F_ACTION_MASK = 1 << 1; private static final byte F_PRINTABLE_MASK = 1 << 2; - /** A key has been pressed, excluding {@link #isAutoRepeat() auto-repeat} {@link #isModifierKey() modifier} keys. */ + /** A key has been pressed, excluding {@link #isAutoRepeat() auto-repeat}-{@link #isModifierKey() modifier} keys. */ public static final short EVENT_KEY_PRESSED = 300; - /** A key has been released, excluding {@link #isAutoRepeat() auto-repeat} {@link #isModifierKey() modifier} keys. */ + /** A key has been released, excluding {@link #isAutoRepeat() auto-repeat}-{@link #isModifierKey() modifier} keys. */ public static final short EVENT_KEY_RELEASED= 301; /** -- cgit v1.2.3