Precision Mode

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Precision Mode

Paul VonZimmerman
Hello,

I apologize if this has been discussed before, but something I really miss about using wacom tablets on Windows is the "precision mode". What precision mode does is map a portion of the screen to the full area of the tablet, making it really easy to make precise strokes. Anyone have any comments or ideas on how to implement this sort of feature?

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Precision Mode

Jason Gerecke
Probably the simplest way would be to the "Coordinate Transformation
Matrix" property on the device. We set this property for Cintiqs to
restrict the pointer to the appropriate monitor, and there's no
particular reason it couldn't be used to restrict to an arbitrary
window or region of the screen. There's a description of how the
property can be set at [1], and I've included a quickly-hacked
together script that does the calculation. The script's output can be
fed directly into the 'xinput set-float-prop' command, and if run
without any arguments will allow you to pick a target window (clicking
on the desktop should print out "1 0 0 0 1 0 0 0 1", which will reset
the tablet to map to the full desktop).

[1]: http://ubuntuforums.org/showthread.php?t=1656089

~~~~~~~~~~~~~~~

#!/bin/bash

REGEX='s/^  -geometry ([0-9]+)x([0-9]+)([+-][0-9]+)([+-][0-9]+)$/\1 \2 \3 \4/p'
DESKTOP=($(xwininfo -root | sed -Ene "$REGEX"))

if [[ $# -eq 0 ]]; then
    WINDOW=($(xwininfo | sed -Ene "$REGEX"))
elif [[ $# -eq 4 ]]; then
    WINDOW=($1 $2 $3 $4)
else
    echo "Usage: $0 [<width> <height> <x> <y>]"
    echo "Suggested Usage: xinput set-float-prop <id> \"Coordinate
Transformation Matrix\" $0"
    exit -1
fi

awk -v WW=${WINDOW[0]} -v WH=${WINDOW[1]} -v WX=${WINDOW[2]} -v
WY=${WINDOW[3]} \
    -v DW=${DESKTOP[0]} -v DH=${DESKTOP[1]} \
    'BEGIN { print WW/DW, 0.0, WX/DW, 0.0, WH/DH, WY/DH, 0.0, 0.0, 1.0 }'

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....



On Sat, Dec 13, 2014 at 1:03 PM, Paul VonZimmerman <[hidden email]> wrote:

> Hello,
>
> I apologize if this has been discussed before, but something I really miss
> about using wacom tablets on Windows is the "precision mode". What precision
> mode does is map a portion of the screen to the full area of the tablet,
> making it really easy to make precise strokes. Anyone have any comments or
> ideas on how to implement this sort of feature?
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Linuxwacom-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Precision Mode

Paul VonZimmerman
This is awesome! Took me a bit to get it to work (did you mean "set-prop" not "set-float-prop"?).
Perhaps a script could be made to do a little more? Maybe have it so you can drag a rectangle instead of selecting a window? I would be interested in making something like this, but I don't have any experience in bash scripting / Linux Wacom stuff. If you could list a few things that would be helpful before I try and hack something together, that would be pretty cool! This is a pretty nifty solution for the time being.

On Sat, Dec 13, 2014 at 6:38 PM, Jason Gerecke <[hidden email]> wrote:
Probably the simplest way would be to the "Coordinate Transformation
Matrix" property on the device. We set this property for Cintiqs to
restrict the pointer to the appropriate monitor, and there's no
particular reason it couldn't be used to restrict to an arbitrary
window or region of the screen. There's a description of how the
property can be set at [1], and I've included a quickly-hacked
together script that does the calculation. The script's output can be
fed directly into the 'xinput set-float-prop' command, and if run
without any arguments will allow you to pick a target window (clicking
on the desktop should print out "1 0 0 0 1 0 0 0 1", which will reset
the tablet to map to the full desktop).

[1]: http://ubuntuforums.org/showthread.php?t=1656089

~~~~~~~~~~~~~~~

#!/bin/bash

REGEX='s/^  -geometry ([0-9]+)x([0-9]+)([+-][0-9]+)([+-][0-9]+)$/\1 \2 \3 \4/p'
DESKTOP=($(xwininfo -root | sed -Ene "$REGEX"))

if [[ $# -eq 0 ]]; then
    WINDOW=($(xwininfo | sed -Ene "$REGEX"))
elif [[ $# -eq 4 ]]; then
    WINDOW=($1 $2 $3 $4)
else
    echo "Usage: $0 [<width> <height> <x> <y>]"
    echo "Suggested Usage: xinput set-float-prop <id> \"Coordinate
Transformation Matrix\" $0"
    exit -1
fi

awk -v WW=${WINDOW[0]} -v WH=${WINDOW[1]} -v WX=${WINDOW[2]} -v
WY=${WINDOW[3]} \
    -v DW=${DESKTOP[0]} -v DH=${DESKTOP[1]} \
    'BEGIN { print WW/DW, 0.0, WX/DW, 0.0, WH/DH, WY/DH, 0.0, 0.0, 1.0 }'

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....



On Sat, Dec 13, 2014 at 1:03 PM, Paul VonZimmerman <[hidden email]> wrote:
> Hello,
>
> I apologize if this has been discussed before, but something I really miss
> about using wacom tablets on Windows is the "precision mode". What precision
> mode does is map a portion of the screen to the full area of the tablet,
> making it really easy to make precise strokes. Anyone have any comments or
> ideas on how to implement this sort of feature?
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Linuxwacom-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Precision Mode

Peter Hutterer-3
On Sun, Dec 14, 2014 at 04:42:04PM -0800, Paul VonZimmerman wrote:
> This is awesome! Took me a bit to get it to work (did you mean "set-prop"
> not "set-float-prop"?).

both should work. the latter sets the type automatically, set-prop just
leaves the existing type in place.

Cheers,
   Peter

> Perhaps a script could be made to do a little more? Maybe have it so you
> can drag a rectangle instead of selecting a window? I would be interested
> in making something like this, but I don't have any experience in bash
> scripting / Linux Wacom stuff. If you could list a few things that would be
> helpful before I try and hack something together, that would be pretty
> cool! This is a pretty nifty solution for the time being.
>
> On Sat, Dec 13, 2014 at 6:38 PM, Jason Gerecke <[hidden email]> wrote:
> >
> > Probably the simplest way would be to the "Coordinate Transformation
> > Matrix" property on the device. We set this property for Cintiqs to
> > restrict the pointer to the appropriate monitor, and there's no
> > particular reason it couldn't be used to restrict to an arbitrary
> > window or region of the screen. There's a description of how the
> > property can be set at [1], and I've included a quickly-hacked
> > together script that does the calculation. The script's output can be
> > fed directly into the 'xinput set-float-prop' command, and if run
> > without any arguments will allow you to pick a target window (clicking
> > on the desktop should print out "1 0 0 0 1 0 0 0 1", which will reset
> > the tablet to map to the full desktop).
> >
> > [1]: http://ubuntuforums.org/showthread.php?t=1656089
> >
> > ~~~~~~~~~~~~~~~
> >
> > #!/bin/bash
> >
> > REGEX='s/^  -geometry ([0-9]+)x([0-9]+)([+-][0-9]+)([+-][0-9]+)$/\1 \2 \3
> > \4/p'
> > DESKTOP=($(xwininfo -root | sed -Ene "$REGEX"))
> >
> > if [[ $# -eq 0 ]]; then
> >     WINDOW=($(xwininfo | sed -Ene "$REGEX"))
> > elif [[ $# -eq 4 ]]; then
> >     WINDOW=($1 $2 $3 $4)
> > else
> >     echo "Usage: $0 [<width> <height> <x> <y>]"
> >     echo "Suggested Usage: xinput set-float-prop <id> \"Coordinate
> > Transformation Matrix\" $0"
> >     exit -1
> > fi
> >
> > awk -v WW=${WINDOW[0]} -v WH=${WINDOW[1]} -v WX=${WINDOW[2]} -v
> > WY=${WINDOW[3]} \
> >     -v DW=${DESKTOP[0]} -v DH=${DESKTOP[1]} \
> >     'BEGIN { print WW/DW, 0.0, WX/DW, 0.0, WH/DH, WY/DH, 0.0, 0.0, 1.0 }'
> >
> > Jason
> > ---
> > Now instead of four in the eights place /
> > you’ve got three, ‘Cause you added one  /
> > (That is to say, eight) to the two,     /
> > But you can’t take seven from three,    /
> > So you look at the sixty-fours....
> >
> >
> >
> > On Sat, Dec 13, 2014 at 1:03 PM, Paul VonZimmerman <[hidden email]>
> > wrote:
> > > Hello,
> > >
> > > I apologize if this has been discussed before, but something I really
> > miss
> > > about using wacom tablets on Windows is the "precision mode". What
> > precision
> > > mode does is map a portion of the screen to the full area of the tablet,
> > > making it really easy to make precise strokes. Anyone have any comments
> > or
> > > ideas on how to implement this sort of feature?
> > >
> > >
> > ------------------------------------------------------------------------------
> > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> > > with Interactivity, Sharing, Native Excel Exports, App Integration & more
> > > Get technology previously reserved for billion-dollar corporations, FREE
> > >
> > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> > > _______________________________________________
> > > Linuxwacom-discuss mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
> > >
> >

> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk

> _______________________________________________
> Linuxwacom-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss