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

Agustin Lobo alobolistas at gmail.com
Wed Apr 22 03:44:38 PDT 2009


I agree, but not only because of large screens. Often you want
to keep your cursor on an specific site on the map, it's inconvenient
having to move it to the menus to select a tool or an operation. 
Sometimes I use
coordinate capture to leave a temporary mark, something
like new layer/edit points, but avoiding all the intermediate steps. Having
independent pointing devices for the display and the menu or
just being able to move through the menus with the keyboard might be better
Agus

maning sambale wrote:
> 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
>>
>>
>>     
>
>
>
>   




More information about the Qgis-user mailing list