1
0
Fork 0

keybindings: Use xkb_keysym_get_name

This commit is contained in:
Jasper St. Pierre 2014-04-07 17:49:06 -04:00
parent 15cf804dbc
commit db058d4a81

View file

@ -196,6 +196,14 @@ reload_keymap (MetaDisplay *display)
&display->keysyms_per_keycode);
}
static const char *
keysym_name (xkb_keysym_t keysym)
{
static char name[32] = "";
xkb_keysym_get_name (keysym, name, sizeof (name));
return name;
}
static void
reload_modmap (MetaDisplay *display)
{
@ -236,12 +244,9 @@ reload_modmap (MetaDisplay *display)
{
if (syms[j] != 0)
{
const char *str;
str = XKeysymToString (syms[j]);
meta_topic (META_DEBUG_KEYBINDINGS,
"Keysym %s bound to modifier 0x%x\n",
str ? str : "none",
keysym_name (syms[j]),
(1 << ( i / modmap->max_keypermod)));
}
@ -1020,18 +1025,6 @@ meta_display_shutdown_keys (MetaDisplay *display)
g_hash_table_destroy (display->key_bindings);
}
static const char*
keysym_name (int keysym)
{
const char *name;
name = XKeysymToString (keysym);
if (name == NULL)
name = "(unknown)";
return name;
}
/* Grab/ungrab, ignoring all annoying modifiers like NumLock etc. */
static void
meta_change_keygrab (MetaDisplay *display,