![]() |
![]() |
![]() |
libskk Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#define SKK_TYPE_KEY_EVENT SkkKeyEvent * skk_key_event_copy (SkkKeyEvent *self
); gchar * skk_key_event_to_string (SkkKeyEvent *self
); gboolean skk_key_event_base_equal (SkkKeyEvent *self
,SkkKeyEvent *key
); SkkKeyEvent * skk_key_event_new (const gchar *name
,gunichar code
,SkkModifierType modifiers
); SkkKeyEvent * skk_key_event_new_from_string (const gchar *key
,GError **error
); SkkKeyEvent * skk_key_event_new_from_x_keysym (guint keyval
,SkkModifierType modifiers
,GError **error
); const gchar * skk_key_event_get_name (SkkKeyEvent *self
); gunichar skk_key_event_get_code (SkkKeyEvent *self
); SkkModifierType skk_key_event_get_modifiers (SkkKeyEvent *self
); void skk_key_event_set_modifiers (SkkKeyEvent *self
,SkkModifierType value
); struct SkkKeyEvent; struct SkkKeyEventClass; enum SkkModifierType; enum SkkKeyEventFormatError;
SkkKeyEvent * skk_key_event_copy (SkkKeyEvent *self
);
Create a copy of the key event.
|
the SkkKeyEvent instance |
Returns : |
a new KeyEvent |
gchar * skk_key_event_to_string (SkkKeyEvent *self
);
Convert the KeyEvent to string.
|
the SkkKeyEvent instance |
Returns : |
a string representing the KeyEvent |
gboolean skk_key_event_base_equal (SkkKeyEvent *self
,SkkKeyEvent *key
);
Compare two key events ignoring modifiers.
|
the SkkKeyEvent instance |
|
a KeyEvent. [in] |
Returns : |
`true` if those base components are equal, `false` otherwise |
SkkKeyEvent * skk_key_event_new (const gchar *name
,gunichar code
,SkkModifierType modifiers
);
Create a key event.
|
a key name. [in][allow-none] |
|
a character code. [in] |
|
state of modifier keys. [in] |
Returns : |
a new KeyEvent |
SkkKeyEvent * skk_key_event_new_from_string (const gchar *key
,GError **error
);
Create a key event from string.
|
a string representation of a key event. [in] |
|
location to store the error occuring, or NULL to ignore. [error-domains SkkKeyEventFormatError]
|
Returns : |
a new KeyEvent |
SkkKeyEvent * skk_key_event_new_from_x_keysym (guint keyval
,SkkModifierType modifiers
,GError **error
);
Create a key event from an X keysym and modifiers.
|
an X keysym. [in] |
|
modifier mask. [in] |
|
location to store the error occuring, or NULL to ignore. [error-domains SkkKeyEventFormatError]
|
Returns : |
a new KeyEvent |
const gchar * skk_key_event_get_name (SkkKeyEvent *self
);
Get and return the current value of the "name" property.
|
the SkkKeyEvent instance to query |
Returns : |
the value of the "name" property |
gunichar skk_key_event_get_code (SkkKeyEvent *self
);
Get and return the current value of the "code" property.
|
the SkkKeyEvent instance to query |
Returns : |
the value of the "code" property |
SkkModifierType skk_key_event_get_modifiers (SkkKeyEvent *self
);
Get and return the current value of the "modifiers" property.
|
the SkkKeyEvent instance to query |
Returns : |
the value of the "modifiers" property |
void skk_key_event_set_modifiers (SkkKeyEvent *self
,SkkModifierType value
);
Set the value of the "modifiers" property to value
.
|
the SkkKeyEvent instance to modify |
|
the new value of the "modifiers" property |
struct SkkKeyEventClass { GObjectClass parent_class; };
The class structure for SKK_TYPE_KEY_EVENT
. All the fields in this structure are private and should never be accessed directly.
typedef enum { SKK_MODIFIER_TYPE_NONE = 0, SKK_MODIFIER_TYPE_SHIFT_MASK = 1 << 0, SKK_MODIFIER_TYPE_LOCK_MASK = 1 << 1, SKK_MODIFIER_TYPE_CONTROL_MASK = 1 << 2, SKK_MODIFIER_TYPE_MOD1_MASK = 1 << 3, SKK_MODIFIER_TYPE_MOD2_MASK = 1 << 4, SKK_MODIFIER_TYPE_MOD3_MASK = 1 << 5, SKK_MODIFIER_TYPE_MOD4_MASK = 1 << 6, SKK_MODIFIER_TYPE_MOD5_MASK = 1 << 7, SKK_MODIFIER_TYPE_LSHIFT_MASK = 1 << 22, SKK_MODIFIER_TYPE_RSHIFT_MASK = 1 << 23, SKK_MODIFIER_TYPE_USLEEP_MASK = 1 << 24, SKK_MODIFIER_TYPE_SUPER_MASK = 1 << 26, SKK_MODIFIER_TYPE_HYPER_MASK = 1 << 27, SKK_MODIFIER_TYPE_META_MASK = 1 << 28, SKK_MODIFIER_TYPE_RELEASE_MASK = 1 << 30 } SkkModifierType;
A set of bit-flags to indicate the state of modifier keys.
"code"
property "code" guint : Read
The base code of the KeyEvent.
This is exclusive to "name".
Default value: 0
"modifiers"
property"modifiers" SkkModifierType : Read / Write
Modifier mask.
Default value: SKK_MODIFIER_TYPE_NONE
"name"
property "name" gchar* : Read
The base name of the KeyEvent.
This is exclusive to "code".
Default value: NULL