Open tr37ion opened 4 years ago
I added the following data to the scrypt and it works ok. Except tilting is not recognized while I actually get tilting data output from the tablet. I added some example data below config.ini
settings
[menu_simple_14v2]
button 0 = key Tab # hide interface
button 1 = key r # rect select (gimp) & pick layer (krita)
button 2 = key ctrl+x # cut
button 3 = key ctrl+c # copy
button 4 = key ctrl+v # paste
button 5 = key ctrl+z # undo
button 6 = key ctrl+y # redo (gimp)
button 7 = key ctrl+shift+z # redo (krita)
button 8 = key 4 # turn left (krita)
button 9 = key 6 # turn right (krita)
button 10 =
button 11 =
button 12 =
button 13 =
...
[tablet_gt156v2]
model_name = GT-156 v2
screen = true
screen_width = 1920
screen_height = 1080
pen_max_x = 68840
pen_max_y = 38720
pen_max_z = 8191
resolution = 5080
buttons = 14
scrollbar = 1
...
[monitor_3+1M]
# 3 monitors arranged horizontally and the tablet below the middle one
# screens widths and heights
screen_1W = 2560
screen_1H = 1440
screen_2W = 2560
screen_2H = 1440
screen_3W = 2560
screen_3H = 1440
screen_4W = 1920
screen_4H = 1080
# global geometry
total_screen_width = ${screen_1W} + ${screen_2W} + ${screen_3W}
total_screen_height = ${screen_1H} + ${screen_4H}
tablet_offset_x = ${screen_1W}
tablet_offset_y = ${screen_1H}
xrandr_output1 = --output DP-0 --mode ${screen_1W}x${screen_1H} --pos 0x0 --rotate normal
xrandr_output2 = --output DP-2 --mode ${screen_2W}x${screen_2H} --pos ${screen_1W}x0 --rotate normal
xrandr_output3 = --output DP-4 --mode ${screen_3W}x${screen_3H} --pos 5120x0 --rotate normal
xrandr_output4 = --output HDMI-0 --mode ${screen_4W}x${screen_4H} --pos ${tablet_offset_x}x${tablet_offset_y} --rotate normal
xrandr_args = ${xrandr_output1} ${xrandr_output2} ${xrandr_output4} ${xrandr_output3}
Some tilting debug output max data I found and the orientation of the pen laying down to one of the four compass points.
08 00 0c 7c 71 49 00 00 00 00 38 00 | X:31756 Y:18801 PRES:0000 TILT_X:056 TILT_Y:000 --> East
08 81 21 8a 37 5c 02 00 00 00 c4 00 | X:35361 Y:23607 PRES:0002 TILT_X:196 TILT_Y:000 --> West
08 00 e7 80 c6 56 00 00 00 00 f9 3b | X:32999 Y:22214 PRES:0000 TILT_X:249 TILT_Y:-59 --> North
08 00 e8 73 4b 28 00 00 00 00 01 ca | X:29672 Y:10315 PRES:0000 TILT_X:001 TILT_Y:-202 --> South
The range seems to be roughly:
WEST: 196 to 255 <-- TILT_X: 0 --> EAST: 0 to 060
NORTH: -54 to 0 <-- TILT_Y: 0 --> SOUTH: -255 to -202
What is strange that tilting the pen from west to east it goes from 196 to 255 then suddenly jumps to 0 and then counts on form 0 to 56 reaching east. Similar effect with north to south tilting as it looks tilting the pen to south counts the opposite way.
Hi, thank you for the information. I've just merged a PR adding tilt support (#66).
Please try the latest version, you'll have to add the folloing extra values to your [tablet_gt156v2]
section:
pen_min_tilt = -60
pen_max_tilt = 60
With Krita it seems that the cursor's position adds/subs an offset relative to the pen depending on the degree of tilting it. I'm using the Krita brush Pencil-5 Tilted
. Testing it with Krita's Tablet Tester in settings dialog doesn't list tilting values at all. Maybe I miss something.
Nice, tilt seems to work fine with this tablet now. I did a first test with Krita and brush Pencil 5 - Tilted
. Directions are fine now, too. As tablet values I set:
[tablet_gt156v2]
model_name = GT-156 v2
screen = true
screen_width = 1920
screen_height = 1080
pen_max_x = 68665
pen_max_y = 38650
pen_max_z = 8191
resolution = 5080
# resolution = 5050
buttons = 14
scrollbar = 1
pen_min_tilt = -60
pen_max_tilt = 60
Here is the debug output I get from this missing device. I inserted the lowest and max X7Y coordinates I could determine.