Toggle dropper shortcut overrides keyboard definitions

Bug #180912 reported by Johncoswell on 2008-01-07
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
Christoffer Holmstedt

Bug Description

The toggle dropper shortcut (mapped to the "d" key) in event-context.cpp is overriding any keyboard verb definitions in use. This toggle call should instead be moved to verbs.cpp and mapped within the keyboard shortcut definitions files.

Bryce Harrington (bryce) on 2008-02-03
Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
~suv (suv-lp) on 2009-10-22
tags: added: ui ui-shortcuts
Johncoswell (johncoswell) wrote :

If no one's going to complain, I'm going to go ahead and remove this feature. It's really getting on my nerves. I don't have commit access to the main branch, so I'll publish the change on a personal branch and refer to it here.

ScislaC (scislac) wrote :

Johncoswell,

You have commit access now. I just needed you LP username. :)

jazzynico (jazzynico) on 2010-05-18
tags: added: shortcuts
removed: ui-shortcuts
~suv (suv-lp) wrote :

'd' as keyboard shortcut is still hard-coded in current trunk (r12170):
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/12170/src/event-context.cpp#L589>

Changed in inkscape:
status: Confirmed → Triaged
tags: added: easy-fix

I have looked at the code and it seems like a bug I can fix. If I understood it correctly it's not just about removing hard-coding of "d" key but also adding it to verbs.cpp. I've found "ContextVerb" for the Dropper Tool already in verbs.cpp so maybe parts of this has been solved before.

Changed in inkscape:
assignee: nobody → Christoffer Holmstedt (christoffer-holmstedt)
status: Triaged → In Progress
~suv (suv-lp) wrote :

Finally getting around to dig out some additional context (sorry for being late with this):

Christoffer Holmstedt wrote on 2013-04-23:
> (…) I've found "ContextVerb" for the Dropper Tool already in verbs.cpp
> so maybe parts of this has been solved before.

1) Based on the old SVN history still available at sf.net, it appears that the verb for the dropper tool context was already defined in the initial commit for 'src/verbs.c':
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/trunk/inkscape/src/verbs.c?view=log&pathrev=868>
and kept after partial C++ification in rev 869:
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/trunk/inkscape/src/verbs.cpp?view=log&pathrev=10642>
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/verbs.cpp?view=log&pathrev=19921>
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/verbs.cpp?view=log&pathrev=20227>
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/verbs.cpp?view=log&pathrev=20240>
<http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/verbs.cpp?view=log&pathrev=22882>

2) The hard-coded 'D|d' keyboard shortcut appears to originate from this revision:
<http://inkscape.svn.sourceforge.net/viewvc/inkscape?view=revision&revision=16742>
as fix for
- Bug #170590 (sf1123529) “toggle key for dropper”
  <https://bugs.launchpad.net/inkscape/+bug/170590>

The proposed fix in the branch removes the special toggle feature of the dropper tool (toggles between any prior tool and the dropper tool) - the <space> toggle for tool switching still works, but always switches back to the select tool, not to the tool used before switching to the dropper.

<opinion>
Personally, I'm not sure which feature is to rate higher: having a configurable keyboard shortcut, or a special toggle feature for the dropper tool.
</opinion>

"<opinion>
Personally, I'm not sure which feature is to rate higher: having a configurable keyboard shortcut, or a special toggle feature for the dropper tool.
</opinion>"

@suv yea, was thinking about that as well. Really hard to tell I personally would like to have a configurable keyboard shortcut.

Is it perhaps possible to implement some kind of verb that remembers what was previously selected?

~suv (suv-lp) wrote :

Diff from new branch <lp:~christoffer-holmstedt/inkscape/lp180912-remove-hard-coded-toggle-dropper-keybinding> tested successfully on OS X 10.7.5 with Inkscape 0.48+devel r12379 (GTK+/X11 as well as GTK+/Quartz):

- the dropper keyboard shortcut still acts a special toggle between dropper and last used tool
- the toggle feature also works after assigning a custom keyboard shortcut to the dropper tool via 'Preferences > Interface': the newly defined custom keyboard shortcut also acts as toggle between dropper and last used tool.
- the original keyboard shortcut for the dropper tool (mapped to the "d" key) can be assigned to a different command, and is no longer overridden by a hard-coded definition.

Changed in inkscape:
status: In Progress → Fix Committed
~suv (suv-lp) on 2013-06-26
Changed in inkscape:
milestone: none → 0.49
Bryce Harrington (bryce) on 2015-02-21
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers