]> Dogcows Code - chaz/openbox/blobdiff - openbox/translate.c
add keyboard shortcuts to the menus. you can specify the shortcut key with & even...
[chaz/openbox] / openbox / translate.c
index a26017e512065fe2b5926dcea603760e578a40b6..97066519f4b9f0cf73e53826e77a59e398cf5777 100644 (file)
@@ -139,3 +139,13 @@ translation_fail:
     g_strfreev(parsed);
     return ret;
 }
+
+const gchar *translate_keycode(guint keycode)
+{
+    KeySym sym;
+    const gchar *ret = NULL;
+
+    if ((sym = XKeycodeToKeysym(ob_display, keycode, 0)) != NoSymbol)
+        ret = XKeysymToString(sym);
+    return g_locale_to_utf8(ret, -1, NULL, NULL, NULL);
+}
This page took 0.02166 seconds and 4 git commands to generate.