From 5d5be2ba2a6e0b3886e0076475ed9d7a2d4ac9ab Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 25 Apr 2007 01:33:20 +0000 Subject: add keyboard shortcuts to the menus. you can specify the shortcut key with & even in root menu and stuff --- openbox/translate.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openbox/translate.c') diff --git a/openbox/translate.c b/openbox/translate.c index a26017e5..97066519 100644 --- a/openbox/translate.c +++ b/openbox/translate.c @@ -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); +} -- cgit v1.2.3