Commit 711e7b04 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

xcb: fix X11 key table ordering

parent 599b30e8
...@@ -97,6 +97,23 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym) ...@@ -97,6 +97,23 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym)
if (sym >= 0x1000100 && sym <= 0x110ffff) if (sym >= 0x1000100 && sym <= 0x110ffff)
return sym - 0x1000000; return sym - 0x1000000;
#if 0
for (size_t i = 0; i < sizeof (tab) / sizeof (tab[0]); i++)
if (i > 0 && tab[i-1].x11 >= tab[i].x11)
{
fprintf (stderr, "key %x and %x are not ordered properly\n",
tab[i-1].x11, tab[i].x11);
abort ();
}
for (size_t i = 0; i < sizeof (old) / sizeof (old[0]); i++)
if (i > 0 && old[i-1].x11 >= old[i].x11)
{
fprintf (stderr, "key %x and %x are not ordered properly\n",
old[i-1].x11, old[i].x11);
abort ();
}
#endif
/* Special keys */ /* Special keys */
res = bsearch (&sym, tab, sizeof (tab) / sizeof (tab[0]), sizeof (tab[0]), res = bsearch (&sym, tab, sizeof (tab) / sizeof (tab[0]), sizeof (tab[0]),
keysymcmp); keysymcmp);
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
{ XK_KP_Begin, KEY_HOME, }, /* KP middle (5 without numlock) */ { XK_KP_Begin, KEY_HOME, }, /* KP middle (5 without numlock) */
{ XK_KP_Insert, KEY_INSERT, }, { XK_KP_Insert, KEY_INSERT, },
{ XK_KP_Delete, KEY_DELETE, }, { XK_KP_Delete, KEY_DELETE, },
{ XK_KP_Equal, '=', },
{ XK_KP_Multiply, '*', }, { XK_KP_Multiply, '*', },
{ XK_KP_Add, '+', }, { XK_KP_Add, '+', },
{ XK_KP_Separator, ',', }, { XK_KP_Separator, ',', },
...@@ -55,6 +54,7 @@ ...@@ -55,6 +54,7 @@
{ XK_KP_7, '7', }, { XK_KP_7, '7', },
{ XK_KP_8, '8', }, { XK_KP_8, '8', },
{ XK_KP_9, '9', }, { XK_KP_9, '9', },
{ XK_KP_Equal, '=', },
{ XK_F1, KEY_F1, }, { XK_F1, KEY_F1, },
{ XK_F2, KEY_F2, }, { XK_F2, KEY_F2, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment