![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
typedef KEYMAP; IBusKeymap; IBusKeymap * ibus_keymap_new (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.
typedef guint KEYMAP[256][7];
Data structure for storing keymap. keymap[.][i] i: 0 - without modifer 1 - shift 2 - caplock 3 - shift caplock 4 - altgr 5 - shift altgr 6 - numlock
IBusKeymap * ibus_keymap_new (const gchar *name);
New an IBusKeymap.
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 : |
A newly allocated IBusKeymap; 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. |