~chihchun/ibus/ibus-chewing

« back to all changes in this revision

Viewing changes to src/IBusChewingEngine-input-events.c

  • Committer: Ding-Yi Chen
  • Date: 2011-09-20 03:04:02 UTC
  • Revision ID: git-v1:c01f7d2d7154f3788333c20aa5980c2a89c907b8
Fixed build error

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#if IBUS_VERSION >= 10200
 
1
#if IBUS_COMPAT_VERSION >= 10200
2
2
/* IBus 1.2 and up */
3
3
gboolean ibus_chewing_engine_process_key_event_1_2(IBusEngine *engine,
4
4
        guint keysym_ignore,  guint  keycode,   guint  modifiers){
32
32
        return TRUE;
33
33
    }
34
34
    IBusChewingEngine *self=IBUS_CHEWING_ENGINE(engine);
35
 
    G_DEBUG_MSG(2,"***[I2] process_key_event(-, %u(%s), %u) ... proceed.",keysym, keyName_get(keysym), modifiers);
 
35
    G_DEBUG_MSG(2,"***[I2] process_key_event(-, %x(%s), %x) ... proceed.",keysym, keyName_get(keysym), modifiers);
36
36
    guint state= modifiers & (IBUS_SHIFT_MASK | IBUS_CONTROL_MASK | IBUS_MOD1_MASK);
37
37
    self->_priv->key_last=keysym;
38
38
    if (state==0){
39
39
        guint keysym_tmp=keysym_KP_to_normal(keysym);
40
40
        if (keysym_tmp){
 
41
            G_DEBUG_MSG(3,"***[I3] process_key_event(): %x is from keypad.", keysym_tmp);
41
42
            /* Is keypad key */
42
43
            if ((self->chewingFlags & CHEWING_FLAG_NUMPAD_ALWAYS_NUMBER) && chewing_get_ChiEngMode(self->context)){
43
44
                chewing_set_ChiEngMode(self->context, 0);