flxzt / rnote

Sketch and take handwritten notes.
https://rnote.flxzt.net
GNU General Public License v3.0
7.87k stars 267 forks source link

xppen eraser not working, buttons not mapped as expected #826

Open m10d opened 11 months ago

m10d commented 11 months ago

Describe the bug
First, this may well be a config issue - but I don't see where, and namely with the pen hardware eraser, it's set as "eraser"; the XPPen driver doesn't provide much info on it's config settings or what "keycodes" the pen outputs. OpenTabletDriver doesn't yet support my tablet.

HW:

XPPen configured as follows: image

XPPen button settings in their driver config app: image

To Reproduce

  1. draw with pen: works as expected
  2. try to erase with the eraser end of pen - draws more lines
  3. "draw" with pen while holding either of the two pen buttons - just draws lines

Expected behavior
some way to make:

Console Output
Run the app in the terminal with flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote and post the output.

nothing is output for the actions above, error or otherwise

Screenshots
n/a

Desktop (please complete the following information):

Additional context
ID's referenced below in comments

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ...
         ...
⎜   ↳ UGTABLET Artist Pro 16 (Gen2) Mouse       id=10   [slave  pointer  (2)]
⎜   ↳ UGTABLET Artist Pro 16 (Gen2) Pen (0)     id=12   [slave  pointer  (2)]
⎜   ↳ XP-Pen Mouse                              id=21   [slave  pointer  (2)]
⎜   ↳ XP-Pen Pen Pen (0)                        id=25   [slave  pointer  (2)]
⎜   ↳ XP-Pen Eraser Eraser (0)                  id=26   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ ...
        ...
    ↳ UGTABLET Artist Pro 16 (Gen2) Keyboard    id=9    [slave  keyboard (3)]
    ↳ UGTABLET Artist Pro 16 (Gen2)             id=11   [slave  keyboard (3)]
    ↳ XP-Pen Mouse                              id=22   [slave  keyboard (3)]
    ↳ XP-Pen Eraser                             id=23   [slave  keyboard (3)]
    ↳ XP-Pen Pen                                id=24   [slave  keyboard (3)]
m10d commented 11 months ago

ID 10, 12, 21, 9, 22 don't output anything when using the pen ID 11, 23, and 24 say no event registered in xinput test (although the buttons are definitely sending something)

ID 15 outputs the following drawing a quick short line over rnote:

motion a[0]=976653 a[1]=5339054 a[2]=0 a[3]=14 a[4]=3 a[5]=-16777215 
motion a[0]=931123 a[1]=4946844 a[2]=0 a[3]=13 a[4]=2 a[5]=-16777215 
motion a[0]=951323 a[1]=4950244 a[2]=0 a[3]=13 a[4]=2 a[5]=-16777215 
motion a[0]=1011923 a[1]=4960446 a[2]=13 a[3]=11 a[4]=2 a[5]=-16777215 
button press   1 
motion a[0]=1014167 a[1]=4958746 a[2]=0 a[3]=11 a[4]=2 a[5]=-16777215 
motion a[0]=1018336 a[1]=4956479 a[2]=0 a[3]=11 a[4]=2 a[5]=-16777215 
motion a[0]=1039177 a[1]=4945143 a[2]=0 a[3]=10 a[4]=2 a[5]=-16777215 
button release 1 
motion a[0]=1041101 a[1]=4943443 a[2]=0 a[3]=10 a[4]=2 a[5]=-16777215 
motion a[0]=1044628 a[1]=4941176 a[2]=0 a[3]=10 a[4]=3 a[5]=-16777215 
motion a[0]=1049437 a[1]=4937775 a[2]=0 a[3]=10 a[4]=3 a[5]=-16777215 
motion a[0]=1055529 a[1]=4932107 a[2]=0 a[3]=9 a[4]=3 a[5]=-16777215 
motion a[0]=1059377 a[1]=4928140 a[2]=0 a[3]=8 a[4]=3 a[5]=-16777215 

ID 26 outputs the following dragging the eraser over a short path on rnote; note it draws a line as above, vs erasing

...
motion a[0]=2398027 a[1]=2343062 a[2]=0 a[3]=13 a[4]=2 
motion a[0]=2401875 a[1]=2356098 a[2]=0 a[3]=13 a[4]=2 
motion a[0]=2414379 a[1]=2396906 a[2]=280 a[3]=11 a[4]=3 
button press   1 
motion a[0]=2416944 a[1]=2399740 a[2]=385 a[3]=11 a[4]=3 
motion a[0]=2420792 a[1]=2403141 a[2]=477 a[3]=11 a[4]=3 
...
motion a[0]=2454459 a[1]=2427512 a[2]=489 a[3]=10 a[4]=2 
motion a[0]=2477865 a[1]=2436581 a[2]=0 a[3]=9 a[4]=3 
button release 1 
motion a[0]=2479468 a[1]=2436581 a[2]=0 a[3]=9 a[4]=3 
motion a[0]=2482995 a[1]=2437148 a[2]=0 a[3]=9 a[4]=3 
motion a[0]=2487805 a[1]=2437715 a[2]=0 a[3]=9 a[4]=4 
...
m10d commented 11 months ago

in XPpen driver configuring the forward/pen-tip-side button to mouse right click, and in rnote setting Mouse secondary button action to erase --> works (holding the forward button and "drawing" does erase.

m10d commented 10 months ago

just noticed that with the same settings above (default erase function for rear eraser) the eraser works as expected in xournal++, so the signals/codes seem likely to be OK. Flip the pen around, it erases; flip back to point, no action needed the tip draws ink as expected.