2 #include "xkbcommon/xkbcommon.h"
7 static void print_keysym(const char *s)
9 KeySym ks = xkb_string_to_keysym(s);
13 printf("0x%lX\n", ks);
16 static void print_string(KeySym ks)
20 xkb_keysym_to_string(ks, s, sizeof s);
24 int main(int argc, char *argv[])
30 fprintf(stderr, "error: not enough arguments\n");
34 if (strcmp(argv[1], "-k") == 0) {
36 sym = strtoul(argv[2], NULL, 16);
38 else if (strcmp(argv[1], "-s") == 0)
41 fprintf(stderr, "error: unrecognized argument \"%s\"\n", argv[1]);
48 print_keysym(argv[2]);