Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

guint get_group0_keyval ( GdkEventKey *  event  ) 

Return the keyval corresponding to the key event in group 0, i.e., in the main (English) layout.

Use this instead of simply event->keyval, so that your keyboard shortcuts work regardless of layouts (e.g., in Cyrillic).

Definition at line 1060 of file event-context.cpp.

Referenced by sp_event_context_private_root_handler(), sp_event_show_modifier_tip(), sp_knot_handler(), and sp_pencil_context_root_handler().

                                            {
    guint keyval = 0;
    gdk_keymap_translate_keyboard_state(gdk_keymap_get_for_display(
            gdk_display_get_default()), event->hardware_keycode,
            (GdkModifierType) event->state, 0 /*event->key.group*/, &keyval,
            NULL, NULL, NULL);
    return keyval;
}


Generated by  Doxygen 1.6.0   Back to index