I got a Huion H420 graphics tablet and I need to remap the keys. There are three key, which are mapped as left click, middle click(presumably) and right click.
I need a way to remap these keys to any other key on the keyboard, as I want to use it for graphics design.
I'm running Ubuntu 17.04, and the tablet shows up with ID 17 when I run xinput list.
1 Answer
What worked for me after reading from various places viz. bunnyrules's answer and the links therein, and this:
- Install DIGImend drivers first from here. I used the
.deb(v7) file and it worked fine. You might also want to removehid-huionmodule if you have it installed. Check withlsmod. Also you might needlibusband wacom binaries and libraries.
I had the following installed on 16.04:
libwacom-bin/xenial-updates,now 0.22-1~ubuntu16.04.1 amd64 [installed,automatic]
libwacom-common/xenial-updates,xenial-updates,now 0.22-1~ubuntu16.04.1 all [installed,automatic]
libwacom2/xenial-updates,now 0.22-1~ubuntu16.04.1 amd64 [installed,automatic]
switchboard-plug-gcc-wacom/xenial,now 0.2.0-0~77~ubuntu0.4.1 amd64 [installed,automatic]
xserver-xorg-input-wacom-hwe-16.04/xenial-updates,now 1:0.34.0-0ubuntu2~16.04.1 amd64 [installed]- Configure tablet in X:
sudo vim /etc/X11/xorg.conf.d/50-huion.conf.
Use this configuration:
# Huion tablets
Section "InputClass" Identifier "Huion class" MatchProduct "HUION" MatchIsTablet "on" MatchDevicePath "/dev/input/event*" Driver "wacom"
EndSection- Now logout and login.
xsetwacom should now detect the H420.
% xsetwacom --list
HUION H420 Pen stylus id: 10 type: STYLUS
HUION H420 Pad pad id: 11 type: PAD- Now you can remap buttons:
ex. if you want to set Button 1 to page up.
xsetwacom --set 'HUION H420 Pad pad' Button 1 "key +pgup"
The format is + for press - for release followed by X11 KeySyms. For the full list see xsetwacom --list modifiers and also man xsetwacom (see PARAMETERS section)
You can also change mappings of the pen stylus buttons :). Button 1 is the pen tip and 2 and 3 are the ones on the pen.
If you screwed up a mapping, you can reset it like this:
xsetwacom --set 'HUION H420 Pen stylus' Button 1 "button +1"