This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Driver Tablet Type Identification.

Tags: None
(comma "," separated)
aiday_w
Registered Member
Posts
6
Karma
0

Driver Tablet Type Identification.

Wed Jul 30, 2014 1:22 am
Hi,
I've been trying to get a little further with a driver I am hacking for the Bosto 2nd generation drawing tablets. The driver registers itself to the input subsystem using a device description, device_id (not the usb device_id) and specifies a series of input BTN and various other keys such a ABS_X..... ABS_PRESSURE etc. The problem I have is multi-levelled I think. Firstly when Krita starts it detects the tablet type and run time output shows something like this:

###################################
# Adding a tablet device: Bosto Kingtee 22HD
Device Type: "Stylus"
# Building tablet axes remapping table:
Abs X 0 -> 0
Abs Y 1 -> 1
Abs Z 2 -> 6
Abs Rotary X 3 -> 6
Abs Pressure 4 -> 2
# Axes limits data
X: 0 40000
Y: 0 25000
Z: 0 0
Pressure: 0 2048
Rotation: 1953655126 543973749
T. Pres: 0 0

If I change the registered driver name string and re-compile describing the tablet as various other existing supported types, I get different mapping table details. This seems to relate the various output streams to Krita's internal variables. How can I find this code and the various mapping options and what can be done about accepting a different driver with potentially new arrangements of data. The simplest thing for me to try is using the name of an existing tablet that has the data in the same places (same map). Then just emulate it. I have tried a few options, but would be better if I understood the numbers and how they relate to the input sub_system key identifiers. Such as BTN_TOOL_PEN, BTN_TOOL_PENCIL, BTN_TOOL_ERASER. Or perhaps more importantly, how the reported device_id(type) relates to functions within Krita, such as tool selection and cursor action within various portions of the Krita workspace.

e.g 'Device_ID options as defined within the Hanwang driver module source code.'
#define STYLUS_DEVICE_ID 0x02
#define TOUCH_DEVICE_ID 0x03
#define CURSOR_DEVICE_ID 0x06
#define ERASER_DEVICE_ID 0x0A
#define PAD_DEVICE_ID 0x0F

I also notice the some types of tablet when reported to Krita instantiate both Stylus mappings and X11 mappings. Why some and not all. What jiggery pokery is going on in Krita at this point and where do I find the code to at least hack this driver into Krita to finally draw a line with my shiny new 22" tablet from China.
Yes indeed I was so disappointed that Bosto only worked under Windows, that I decided to have a look at what was going on. So there are several equally interested parties also awaiting my progress.

Any help would be appreciated.
Regards
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
Oooh! This is real progress! It might not seem like it, but with this information, it should be possible to make Krita play ball with your bosto tablet. Check the code in krita/ui/input/wintab/kis_tablet_support_x11.cpp to see what needs fixing, and a patch would be very, very welcome!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell