HUION Inspiroy 2 tablet driver in Julia

What do you mean by xev application program

You start xev simply by typing xev into a shell, hover the mouse over it’s little white window and it will then show you on stdout for each keyboard keystroke or mouse/tablet button click a KeyPress/KeyRelease or a ButtonPress/ButtonRelease event sent by the X11 server to applications. KeyPress/KeyRelease events contain both the “keycode” provided by the device driver, as well as the “keysym” mapped onto that key by a keysym mapping table managed by the X11 server. You can change the keycode->keysym mapping with the command-line tool xmodmap.

Questions you may want to answer:

  • Which type of display server are you using? There are two: an older one known as “MIT X11” or “The X Window System”, and a newer one known as “Wayland”. (I personally still know very little about Wayland, as I haven’t used it yet, but the Linux world is in the middle of transitioning from X11 to Wayland, which can complicate things a bit.)
  • If you are using an X11 application and display server: is the driver sending KeyPress or ButtonPress events for the keys/buttons that you are interested in?

(None of this, by the way, has anything to do with Julia. Julia isn’t really a language suitable for writing kernel device drivers, something that is (almost) entirely done in C. But I strongly suspect you don’t actually need a new device driver, and can use existing mapping mechanisms to do what you want.)

2 Likes