/* -*- compile-command: "gcc -Wall -o get-lv3-modifiers get-lv3-modifiers.c `pkg-config x11 --cflags --libs`" -*- */
#include <X11/XKBlib.h>
#include <X11/keysym.h>
#include <stdio.h>
#include <stdlib.h>

int
main (int argc, char **argv)
{
  Display *display;
  unsigned int modifiers;

  display = XOpenDisplay (NULL);
  if (!display)
    {
      fprintf (stderr, "can't open display\n");
      exit (1);
    }

  modifiers = XkbKeysymToModifiers (display, XK_ISO_Level3_Shift);
  printf ("%x\n", modifiers);
  XCloseDisplay (display);

  return 0;
}
