[Fwd: Re: [Qgis-user] Assigning a keyboard shortcut to a plugin]

maning sambale emmanuel.sambale at gmail.com
Wed Apr 22 02:07:12 PDT 2009


So this is possible in a plugin? Kewl!

Slightly off-topic, would it be nice to create a plugin for
customizing key-bindings of QGIS functions?  Some functions have
shorcut keys while others don't.  One of the toolset that can greatly
benefit are the navigation (zoom and pan) and digitizing tools (toggle
to edit, add vertex, move vertex, etc.).

With the ever increasing monitor screen size, I find it cumbersome to
move and click the mouse just to call a certain function.
Just thinking out loud here :)

On Wed, Apr 22, 2009 at 4:56 PM, Carson Farmer <carson.farmer at gmail.com> wrote:
> I forgot to also send this to the list, in case others are interested....
>
> --
> Carson J. Q. Farmer
> ISSP Doctoral Fellow
> National Centre for Geocomputation (NCG),
> Email: Carson.Farmer at gmail.com
> Web:   http://www.carsonfarmer.com/
>      http://www.ftools.ca/
>
>
>
>
> ---------- Forwarded message ----------
> From: Carson Farmer <carson.farmer at gmail.com>
> To: luca_manganelli at comune.trento.it
> Date: Wed, 22 Apr 2009 09:55:31 +0100
> Subject: Re: [Qgis-user] Assigning a keyboard shortcut to a plugin
> Hi Luca,
>
> You can probably do this via the keyPressEvent() of your plugin dialog:
>
> def keyPressEvent( self, e ):
>   if ( e.modifiers() == Qt.ControlModifier or e.modifiers() ==
> Qt.MetaModifier ) and e.key() == Qt.Key_Some_Key:
>     # run the tool
>   else:
>     QDialog.keyPressEvent( self, e )
>
> Hope that helps,
>
> Carson
>
> --
> Carson J. Q. Farmer
> ISSP Doctoral Fellow
> National Centre for Geocomputation (NCG),
> Email: Carson.Farmer at gmail.com
> Web:   http://www.carsonfarmer.com/
>      http://www.ftools.ca/
>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>



-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------



More information about the Qgis-user mailing list