Package: kamvas-driver
Python based Linux driver for Huion Kamvas Pro devicesThis is a userspace python based evdev driver for Huion Kamvas Pro devices so that they can be used on Linux machines which don't have officially supported driver.I personally own a Huion Kamvas Pro 13 and I have tested this driver successfully with that device. The driver should hopefully also be usable with other Huion Kamvas devices, but they havn't been tested.Feel free to open an issue if you ran into trouble or write me a message if you found this useful.FeaturesThis script uses a simple YAML configuration file to give you control over how your graphics tablet interacts with your computer. This configuration file is located at~/.kamvas_config.yaml.With this driver you can:Define actions for every button on your tablet, even for pen touch. Actions can be defined for the following eventsPen click on the screenPen ButtonsTablet buttonsScrollbar levelsScrollbar incrementScrollbar decrementManage button action profiles that you can easily switch betweenAutomatically map the driver output to a desired display if you have multiple monitors.NOTEThis usesxinputso you will need to have that installed on your system for this functionality to workThe driver is automatically stopped when the USB device is unplugged and gets automatically started when it gets plugged in againSetupYou will need to install the following packages from your distribution (Archlinux commands shown here)Python 3: This script was tested with Python 3. It might run just fine on Python 2 if you can install the required python modulessudo pacman -S python3xf86-input-evdev: This is the Digimend evdev package which adds X events relevant to graphics tablets and makes them available to other appssudo pacman -S xf86-input-input-evdevInstall the driver modulepip3 install kamvas-driverUpdate your/etc/X11/xorg.conffile (create it if it is not already there):Section "InputClass"
    Identifier "evdev tablet catchall"
    MatchIsTablet "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
EndSectionYou might need to make sure that the DIGImend kernel driver are not loaded. Unload them using this commandsudo rmmod hid-uclogicSetup a default configuration file for the driverkamvas -cUsageStart the driverkamvas startStop the driverkamvas stopConfigurationYou can create a default configuration file at~/.kamvas_config.yamlusing the following commandkamvas -cYou can edit~/.kamvas_config.jsonfile to define your custom settings for your graphics tablet. The config file allows you to define the following:Actions that must be performed when a button is clickedThe script usesevdevevents to perform these actions so the values for these actions can be any commands starting withKEY_orBTN_. For example:UseKEY_Ato effectively simulate the presseing of theakey on your keyboardYou can also combine events likeKEY_LEFTSHIFT+KEY_Ato effectively pressShift+awhen that action is firedYou can use the following command to observe which evdev events are fired when you press keys on your device. You will need to figure out the path of the event file for the device you are trying to test. It is usually located in/dev/input/. You can also try looking for it by name in/dev/input/by-id/and/dev/input/by-path/kamvas -t <path_to_event_file>Leave the actions field empty if you don't to perform any action for that evenFor example: You might not want actions to be performed when you touch the pen to the screen and want it behave like a normal mouse click. But the option if available in case you do want perform an action in that case.You can also define multiple action groups. See theconfig.jsonto see an example.Thedefault_displayfield automatically maps your driver output to a given system display name (likeHDMI1,DVI1, etc)This feature requiredxinputto be installed on your systemRemove this field if you do not havexinputinstalled or are just using a single displayIf you have multiple displays and you do not use this field then the output from your graphics tablet will be mapped to all the displays by defaultThedefault_actionfield defines the button actions group that will be used by the driver ifkamvas start -a=<action_name>is not used to start the driverCapabilies of your graphics tablet (like its resolution, pressure sensitivity, etc)You will most likely not need to change this but might be useful if you are trying to adapt this driver to some other deviceThese fields arexinput_namevendor_idproduct_idpenIf you do need to redefine these values that trykamvas -oto print driver output as it happensYou might need to dig into the code and make sure to pass in the-ror-coptions to the driver subprocess-rwill allow you to monitor raw USB data as it comes in-cwill allow you to monitor the calculated values being sent to the system by the driverkamvas -uwhich will print some USB information as the device gets plugged in or removedDigimend uclogic-tools. Specifically, try usinguclogic-probe | uclogic-decodeKnown IssuesThe driver is unable to survive a system suspend or hibernate eventOn resume, it will continue to show that the driver is running but the cursor will be unresponsive if you try to use the deviceYou will have to stop the driver and start it againkamvas stop
kamvas start