Celeb Glow
general | March 27, 2026

18.04: How to configure shortcut keys on Huion H640P tablet

I have just bought a Huion H640P tablet (just for writing notes), and use it with Ubuntu 18.04 with kernel 5.3.0-40-generic.

I installed digimend-kernel-drivers v9 to make the tablet work.

Now, how can I configure hotkeys on the tablet and make the configuration permanent so that I don't have to launch commands like:

xsetwacom set "HID 256c:006d Pad pad" button 1 key Ctrl z

each time I start Ubuntu? (for instance, I want to set button 2 for scrolling).

6

1 Answer

Since you already know the commands you need to use (based on your question), the vast majority of the information you need is already here. To clarify, a script is nothing more than a text file of commands that has its permissions set to executable.

To avoid having to run your script of commands every time, all you need to do isrun the script at startup.

Once you've chosen your scripting language there are numerous resources that explain the syntax. If you get stuck on the programming aspect you can always ask find answers to specific questions by utilizing for example our sister site

Personally I often use bash for simple scripts such as you seem to require, Here's a command reference However in your case you might not need that much. A simple script might be described as:

#!/bin/bash
command 1
command 2
command 3
exit

where command 1 is xsetwacom set "HID 256c:006d Pad pad" button 1 key Ctrl z

I don't have your hardware and as such am unable to test it's capabilities, you however can do this with a bit of research and effort. xinput could be a useful tool for this.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy