IBus Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct IBusKeymap; struct IBusKeymapClass; IBusKeymap * ibus_keymap_new (const gchar *name
); IBusKeymap * ibus_keymap_get (const gchar *name
); guint ibus_keymap_lookup_keysym (IBusKeymap *keymap
,guint16 keycode
,guint32 state
);
An IBusKeymap defines the mapping between keyboard scancodes and keyboard symbols such as numbers, alphabets, and punctuation marks.
Some input methods assume certain keyboard layout
(such as Chewing and Wubi requires an US-QWERTY layout),
and expect key symbols to be arranged in that order.
These input methods should new an IBusKeymap
instance and define the keyboard layout.
Then ibus_keymap_lookup_keysym()
can
convert scancodes back to the key symbols.
see_also
: IBusComponent, IBusEngineDesc
struct IBusKeymap { gchar *name; guint keymap[256][7]; };
A keymap object in IBus.
IBusKeymap * ibus_keymap_new (const gchar *name
);
ibus_keymap_new
is deprecated and should not be used in newly-written code. This function has been deprecated and should
not be used in newly written code. Please use ibus_keymap_get()
.
Get an IBusKeymap associated with the giving name.
This function loads the keymap file specified in name
in the IBUS_DATA_DIR/keymaps directory.
|
The keymap file to be loaded, such as 'us', 'jp'. |
Returns : |
An IBusKeymap associated with the giving name; or NULL if failed. |
IBusKeymap * ibus_keymap_get (const gchar *name
);
Get an IBusKeymap associated with the giving name.
This function loads the keymap file specified in name
in the IBUS_DATA_DIR/keymaps directory.
|
The keymap file to be loaded, such as 'us', 'jp'. |
Returns : |
An IBusKeymap associated with the giving name; or NULL if failed. |
guint ibus_keymap_lookup_keysym (IBusKeymap *keymap
,guint16 keycode
,guint32 state
);
Convert the scancode to keysym, given the keymap.
|
An IBusKeymap. |
|
A scancode to be converted. |
|
Modifier flags(such as Ctrl, Shift). |
Returns : |
Corresponding keysym. |