Index: src/ibushotkey.c |
diff --git a/src/ibushotkey.c b/src/ibushotkey.c |
index 7f857a3d7477b6a3a70b179a2cb4e0f62d0385d1..f49b94901a56eaec906a8ba4bc2516c487958218 100644 |
--- a/src/ibushotkey.c |
+++ b/src/ibushotkey.c |
@@ -502,3 +502,19 @@ ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile, |
return event; |
} |
+ |
+GQuark |
+ibus_hotkey_profile_lookup_hotkey (IBusHotkeyProfile *profile, |
+ guint keyval, |
+ guint modifiers) |
+{ |
+ IBusHotkeyProfilePrivate *priv; |
+ priv = IBUS_HOTKEY_PROFILE_GET_PRIVATE (profile); |
+ |
+ IBusHotkey hotkey = { |
+ .keyval = keyval, |
+ .modifiers = modifiers & priv->mask, |
+ }; |
+ |
+ return (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hotkey)); |
+} |