org.kde.koala
public class KKey extends Object implements QtSupport
See Also: KKeyNative KKeySequence KShortcut
UNKNOWN: A KKey object represents a single key with possible modifiers (Shift, Ctrl, Alt, Win).
Field Summary | |
---|---|
static int | ALT |
static int | CTRL |
static int | MOD_FLAG_COUNT
The number of flags. |
static int | QtWIN |
static int | SHIFT
Flags to represent the modifiers. |
static int | WIN |
Constructor Summary | |
---|---|
protected | KKey(Class dummy) |
KKey()
Creates a new null KKey. | |
KKey(int keyQt)
Creates a new key for the given Qt key code. | |
KKey(QKeySequence keySeq)
Creates a new key from the first key code of the given key sequence. | |
KKey(QKeyEvent keyEvent)
Extracts the key from the given key event. | |
KKey(KKey key)
Copy constructor. | |
KKey(String key)
Creates a new key from the given description. | |
KKey(int key, int mod) |
Method Summary | |
---|---|
void | clear()
Clears the key. |
int | compare(KKey key)
Compares this key with the given KKey object. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
boolean | init(int keyQt)
Initializes the key with the given Qt key code. |
boolean | init(QKeySequence keySeq)
Initializes the key with the first key code of the given key sequence. |
boolean | init(QKeyEvent keyEvent)
Initializes the key by extracting the code from the given key event. |
boolean | init(KKey key)
Copies the given key. |
boolean | init(String key)
Initializes the key with the given description. |
boolean | init(int key, int mod) |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
boolean | isNull()
Returns true if the key is null (after clear() or empty
constructor). |
int | keyCodeQt()
Returns the qt key code. |
static String | modFlagLabel(int f)
Returns a user-readable representation of the given modifiers. |
int | modFlags() |
static KKey | nil()
Returns a null key. |
boolean | op_equals(KKey key)
Compares the symbol and modifiers of both keys. |
boolean | op_lt(KKey key)
Compares the symbol and modifiers of both keys. |
boolean | op_not_equals(KKey key)
Compares the symbol and modifiers of both keys. |
void | simplify() |
int | sym() |
String | toString()
Returns a human-readable representation of the key in the form
"modifier+key". |
String | toStringInternal()
Returns an untranslated text representation of the key in the form
"modifier+key", suitable e.g. for saving in configuration files. |
See Also: ModFlag
UNKNOWN: The number of flags.
UNKNOWN: Flags to represent the modifiers.
Parameters: keyQt the qt keycode
See Also: org.kde.qt.Qt#Key
UNKNOWN: Creates a new key for the given Qt key code.
Parameters: keySeq the key sequence that contains the key
UNKNOWN: Creates a new key from the first key code of the given key sequence.
Parameters: keyEvent the key event to get the key from
UNKNOWN: Extracts the key from the given key event.
UNKNOWN: Copy constructor.
Parameters: key the description of the key
See Also: KKeyServer#Sym#init
UNKNOWN: Creates a new key from the given description.
UNKNOWN:
See Also: KKey
UNKNOWN: Clears the key.
Parameters: key the key to compare with this key
Returns: a negative number if the given KKey is larger, 0 if they are equal and a positive number this KKey is larger
UNKNOWN: Compares this key with the given KKey object.
Parameters: keyQt the qt keycode
Returns: true if successful, false otherwise
See Also: org.kde.qt.Qt#Key
UNKNOWN: Initializes the key with the given Qt key code.
Parameters: keySeq the key sequence that contains the key
Returns: true if successful, false otherwise
UNKNOWN: Initializes the key with the first key code of the given key sequence.
Parameters: keyEvent the key event to get the key from
Returns: true if successful, false otherwise
UNKNOWN: Initializes the key by extracting the code from the given key event.
Parameters: key the key to copy
Returns: true if successful, false otherwise
UNKNOWN: Copies the given key.
Parameters: key the description of the key
Returns: true if successful, false otherwise
See Also: KKeyServer#Sym#init
UNKNOWN: Initializes the key with the given description.
UNKNOWN:
Returns: true if the key is null
UNKNOWN: Returns true if the key is null (after clear() or empty constructor).
Returns: the qt key code or 0 if there is no key set.
See Also: org.kde.qt.Qt#Key
UNKNOWN: Returns the qt key code.
Parameters: f the modifiers to convert
Returns: the string representation of the modifiers
UNKNOWN: Returns a user-readable representation of the given modifiers.
UNKNOWN:
See Also: KKey
UNKNOWN: Compares the symbol and modifiers of both keys.
See Also: KKey
UNKNOWN: Compares the symbol and modifiers of both keys.
See Also: KKey
UNKNOWN: Compares the symbol and modifiers of both keys.
UNKNOWN:
UNKNOWN:
Returns: the string representation of the key
See Also: KKey
UNKNOWN: Returns a human-readable representation of the key in the form "modifier+key".
UNKNOWN: Returns an untranslated text representation of the key in the form "modifier+key", suitable e.