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

Enable Wacom Bamboo gesture via AppGestures.xml [SOLVED]

Tags: gesture, bamboo, appgesture.xml gesture, bamboo, appgesture.xml gesture, bamboo, appgesture.xml
(comma "," separated)
User avatar
francescobona
Registered Member
Posts
29
Karma
0
Hi! Krita unfortunately doesn't support gesture from my wacom bamboo. I'm especially interested in controlling canvas rotation by gesture
I've read somewhere that should be possible to enable unsupported programs by editing the bamboo .xml preference file.
Does anybody knows how to do that? Thanks!

Last edited by francescobona on Sun Oct 30, 2016 12:57 am, edited 1 time in total.
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
Add this to end of the file before the </root> closing tag:

Code: Select all
  <ArrayElement type="map">
    <displayname>Krita</displayname>
    <identifier type="string">krita</identifier>
    <ZoomIn type="map">
      <input type="string">mousedown</input>
      <mousebutton type="string">middle</mousebutton>
      <modifiers type="string">control</modifiers>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">2</granularity>
    </ZoomIn>
    <ZoomOut type="map">
      <input type="string">mouseup</input>
      <mousebutton type="string">middle</mousebutton>
      <modifiers type="string">control</modifiers>
      <amount type="double">1</amount>
      <amountmultiplier type="double">-1</amountmultiplier>
      <granularity type="double">2</granularity>
    </ZoomOut>
    <RotateCW type="map">
      <keystroke type="kestring"><![CDATA[6]]></keystroke>
      <amount type="double">7</amount>
    </RotateCW>
    <RotateCCW type="map">
      <keystroke type="kestring"><![CDATA[4]]></keystroke>
      <amount type="double">7</amount>
    </RotateCCW>
  </ArrayElement>


The zoom works flawless, but I can't find a way to enable smooth rotation so I just set it to use discreet rotation mode.
Change the value "7" (both of them), to your preference. This set the gesture/canvas-rotation ratio. A bigger value decreases the canvas rotation speed.
User avatar
francescobona
Registered Member
Posts
29
Karma
0
Thanks so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The rotation function works perfectly now !!!! Fantastic!!!
Do you think it's also possible to control zoom by gesture? Now it does not work..
I swear this is the last thing I ask you. I swear!!!!
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
Zoom should be working.
Check on "Configure Krita" >> "Canvas Input Settings" >> "Zoom Canvas". There should be a "Mouse Button" shortcut set to "Ctrl + Middle Button - Relative Zoom Mode".
Also the configuration I'm using now includes Pan. It looks like this.:
Code: Select all
  <ArrayElement type="map">
    <displayname>Krita</displayname>
    <identifier type="string">krita</identifier>
    <AutoBehavior>zoom</AutoBehavior>
    <ScrollUp type="map">
      <input type="string">mouseup</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </ScrollUp>
    <ScrollDown type="map">
      <input type="string">mousedown</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </ScrollDown>
    <PanLeft type="map">
      <input type="string">mouseleft</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </PanLeft>
    <PanRight type="map">
      <input type="string">mouseright</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </PanRight>
    <ZoomIn type="map">
      <input type="string">mousedown</input>
      <mousebutton type="string">middle</mousebutton>
      <modifiers type="string">control</modifiers>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </ZoomIn>
    <ZoomOut type="map">
      <input type="string">mouseup</input>
      <mousebutton type="string">middle</mousebutton>
      <modifiers type="string">control</modifiers>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </ZoomOut>
    <RotateCW type="map">
      <keystroke type="kestring"><![CDATA[6]]></keystroke>
      <amount type="double">30</amount>
    </RotateCW>
    <RotateCCW type="map">
      <keystroke type="kestring"><![CDATA[4]]></keystroke>
      <amount type="double">30</amount>
    </RotateCCW>
  </ArrayElement>


You can also try to reset Krita Settings by deletting any Krita related files or folders under "C:/Users/[YourUserName]/Appdata/Local" and "C:/Users/[YourUserName]/Appdata/Roaming"
User avatar
francescobona
Registered Member
Posts
29
Karma
0
I have completely uninstalled and reinstalled Krita to make a clean test but zoom does not work. :'(
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
Uninstalling Krita doesn't remove config files.

It can be your tablet config. Does the zoom work with other applications?

You can try my config files: https://mega.nz/#!Zt8wEa7D!9O5wMLx-lyoyHpYM6x2pt24CPO2TujvQSYAGiN9HP5E

Copy the AppGestures.xml to C:\Program Files\Tablet\Wacom
Copy the kritawacomtouch.profile to C:\Users\["Your User Name"]\AppData\Roaming\krita\input
On krita go to Settings > Configure Krita > Canvas Input Settings and Select "Krita Wacom Touch" on the profile drop-down.

Pan Zoom and Rotation are working for me, so it should work for you. But wacom drivers are very weird so no one can be sure.

You can try also reseting the wacom driver configuration.
User avatar
francescobona
Registered Member
Posts
29
Karma
0
Of course I had erased all Krita traces before reinstalling.
Anyway .. I also tried your last config files, even kritawacomtouch.profile, but does not work. The rotation gesture is perfect but zoom gesture doesen't works.
In photoshop works perfectly. Maybe I have a different bamboo version ... I have Windows 10 x64 and a Wacom Bamboo Pen & Touch with 5.3.5-3 R Driver
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
francescobona wrote:Of course I had erased all Krita traces before reinstalling.
Anyway .. I also tried your last config files, even kritawacomtouch.profile, but does not work. The rotation gesture is perfect but zoom gesture doesen't works.
In photoshop works perfectly. Maybe I have a different bamboo version ... I have Windows 10 x64 and a Wacom Bamboo Pen & Touch with 5.3.5-3 R Driver


If you press CTRL + MouseMiddleButton then drag up and down do you get ZOOM on Krita?

Do you have any Wacom driver configuration set specifically for Krita?

Did you tried resetting Wacom driver configuration or even Uninstalling and re-installing it?

Can you zoom on Web Browsers?

Does PAN work on Krita?
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
francescobona wrote:Of course I had erased all Krita traces before reinstalling.
Anyway .. I also tried your last config files, even kritawacomtouch.profile, but does not work. The rotation gesture is perfect but zoom gesture doesen't works.
In photoshop works perfectly. Maybe I have a different bamboo version ... I have Windows 10 x64 and a Wacom Bamboo Pen & Touch with 5.3.5-3 R Driver


Ok. I found out that Bamboo does not send mouse events, just keystrokes.

The config for Bamboo should look like this:
Code: Select all
  <ArrayElement type="map">
    <displayname>Krita</displayname>
    <identifier type="string">krita</identifier>
    <ScrollUp type="map">
      <keystroke type="kestring"><![CDATA[&control;&alt;&down;]]></keystroke>
      <amount type="double">90</amount>
      <amountmultiplier type="double">10</amountmultiplier>
    </ScrollUp>
    <ScrollDown type="map">
      <keystroke type="kestring"><![CDATA[&control;&alt;&up;]]></keystroke>
      <amount type="double">90</amount>
      <amountmultiplier type="double">10</amountmultiplier>
    </ScrollDown>
    <PanLeft type="map">
      <keystroke type="kestring"><![CDATA[&control;&alt;&right;]]></keystroke>
      <amount type="double">90</amount>
      <amountmultiplier type="double">10</amountmultiplier>
    </PanLeft>
    <PanRight type="map">
      <keystroke type="kestring"><![CDATA[&control;&alt;&left;]]></keystroke>
      <amount type="double">90</amount>
      <amountmultiplier type="double">10</amountmultiplier>
    </PanRight>
    <ZoomIn type="map">
      <keystroke type="kestring"><![CDATA[&control;&kp+;]]></keystroke>
      <amount type="double">50</amount>
      <amountmultiplier type="double">1</amountmultiplier>
    </ZoomIn>
    <ZoomOut type="map">
      <keystroke type="kestring"><![CDATA[&control;&kp-;]]></keystroke>
      <amount type="double">50</amount>
      <amountmultiplier type="double">1</amountmultiplier>
    </ZoomOut>
    <RotateCW type="map">
      <keystroke type="kestring"><![CDATA[6]]></keystroke>
      <amount type="double">30</amount>
    </RotateCW>
    <RotateCCW type="map">
      <keystroke type="kestring"><![CDATA[4]]></keystroke>
      <amount type="double">30</amount>
    </RotateCCW>
  </ArrayElement>


It is better to restore the original xml from the driver first and then add this to the file. My xml file was from Intuos5 driver, so it may be really different.
Also, restore Krita's input settings.
I included the code for panning, but the driver tries to do smooth-scrolling, so it doesn't work very well.
Let me know if that works.
User avatar
francescobona
Registered Member
Posts
29
Karma
0
Unfortunately still does not work, moreover now the rotation does not stop when i stop my fingers but continues for a while.
I thank you very much anyway!!!! The most important thing for me was the gesture rotation and, thanks to you, now I have it.
Thank you very mutch.
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
francescobona wrote:Unfortunately still does not work, moreover now the rotation does not stop when i stop my fingers but continues for a while.
I thank you very much anyway!!!! The most important thing for me was the gesture rotation and, thanks to you, now I have it.
Thank you very mutch.

That is unfortunate :-\

Give it one last try with this:

Code: Select all
      <ArrayElement type="map">
        <displayname>Krita</displayname>
        <identifier type="string">krita</identifier>
        <AutoBehavior>zoom</AutoBehavior>
        <ZoomIn type="map">
          <input type="string">scrollwheelup</input>
          <amount type="double">7</amount>
        </ZoomIn>
        <ZoomOut type="map">
          <input type="string">scrollwheeldown</input>
          <amount type="double">7</amount>
        </ZoomOut>
        <RotateCW type="map">
          <keystroke type="kestring"><![CDATA[6]]></keystroke>
          <amount type="double">7</amount>
        </RotateCW>
        <RotateCCW type="map">
          <keystroke type="kestring"><![CDATA[4]]></keystroke>
          <amount type="double">7</amount>
        </RotateCCW>
      </ArrayElement>



Also the zoom should be working out of the box, with "two fingers scroll" up and down. If that was not the case, then there is some extra factor, preventing zoom to work.

Anyway I'm glad for helping.
User avatar
francescobona
Registered Member
Posts
29
Karma
0
Hey great news!!!!!!!!!!! .....
I tried your last script but gesture zoom still did not work as well as the problem of "non stopping" rotation is still present.
So I tried the only change that seemed possible that was to delete the <AutoBehavior> zoom </ AutoBehavior> string.
AND IT WORKED!!!!!!!!!!! AMAZING!!!!!
Now the gesture zoom works like the mouse scrolling zoom and also the rotation is perfectly synchronized with my fingers.
Thanks so much!!!! The credit belongs to you!!!!!
User avatar
edgarejm
Registered Member
Posts
50
Karma
0
OS
Out of curiosity, anyone got grabberhand working in the xml file? I'm trying to edit it so I could get a grabberhand gesture working, but I have no idea what to type in. Thanks for the info above btw.


User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
edgarejm wrote:Out of curiosity, anyone got grabberhand working in the xml file? I'm trying to edit it so I could get a grabberhand gesture working, but I have no idea what to type in. Thanks for the info above btw.


If by "grabberhand" you mean "panning", it should be this:

Code: Select all
    <ScrollUp type="map">
      <input type="string">mouseup</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </ScrollUp>
    <ScrollDown type="map">
      <input type="string">mousedown</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </ScrollDown>
    <PanLeft type="map">
      <input type="string">mouseleft</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </PanLeft>
    <PanRight type="map">
      <input type="string">mouseright</input>
      <mousebutton type="string">middle</mousebutton>
      <amount type="double">1</amount>
      <amountmultiplier type="double">1</amountmultiplier>
      <granularity type="double">1</granularity>
    </PanRight>


Add the code under this <identifier type="string">krita</identifier>
But it don't seems to work on Bamboo, only on Intuos.

You can try anyway.
If anything goes wrong, it will not break anything else except Krita touch support. Which already doesn't work out of the box.
User avatar
edgarejm
Registered Member
Posts
50
Karma
0
OS
@artur

Yeah, I tried that code. It only pans left and right but not up and down. I looked at the xml file and saw that some programs had an entry for a "grabberhand," which is this code;
Code: Select all
    <GrabberHand type="map">
      <keystroke type="kestring"><![CDATA[&space;]]></keystroke>
    </GrabberHand>


I tried copying this code and pasting it under the Krita identifier, but it didn't work. I know that in Krita that space and/or middle mouse click works as a "grabberhand" tool. I can see that the code above indicates that the keystring input is the spacebar. Since it didn't work I tried editing that entry to use middle mouse click instead. It also didn't work. I don't know if it didn't work because of my code syntax or something else. I wish I had saved the middle mouse click code I wrote. I did a wacom driver update and it wrote over the xml file, so now I don't remember what I did last Sunday.

Anyways... I think I'll stick with "no gestures" for now. I set up the wacom express keys to do all the rotation/zooming/panning I need.




Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]