Skip to content

Commit

Permalink
tools: add a tablet debugging tool
Browse files Browse the repository at this point in the history
Nothing sophisticated but easier to debug certain tablet oddities.
It shows a bar for each axis on the tablet (and the evdev axis) and prints
that relative to the axis range. This makes it easy to check if we do hit the
full range (especially for distance/pressure/tilt) and whether that matches
with what the device gives us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Nov 18, 2019
1 parent 2c613fe commit 733eb07
Show file tree
Hide file tree
Showing 5 changed files with 580 additions and 0 deletions.
14 changes: 14 additions & 0 deletions meson.build
Expand Up @@ -495,6 +495,20 @@ configure_file(input : 'tools/libinput-debug-events.man',
install_dir : dir_man1,
)

libinput_debug_tablet_sources = [ 'tools/libinput-debug-tablet.c' ]
executable('libinput-debug-tablet',
libinput_debug_tablet_sources,
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install : true)

configure_file(input : 'tools/libinput-debug-tablet.man',
output : 'libinput-debug-tablet.1',
configuration : man_config,
install_dir : dir_man1,
)

libinput_quirks_sources = [ 'tools/libinput-quirks.c' ]
libinput_quirks = executable('libinput-quirks',
libinput_quirks_sources,
Expand Down
7 changes: 7 additions & 0 deletions src/util-macros.h
Expand Up @@ -49,4 +49,11 @@
#define ANSI_BRIGHT_CYAN "\x1B[0;36;1m"
#define ANSI_NORMAL "\x1B[0m"


#define ANSI_UP "\x1B[%dA"
#define ANSI_DOWN "\x1B[%dB"
#define ANSI_RIGHT "\x1B[%dC"
#define ANSI_LEFT "\x1B[%dD"


#define CASE_RETURN_STRING(a) case a: return #a

0 comments on commit 733eb07

Please sign in to comment.