Hi Ian,
I just wandered into CVPCB to fix the Show3DView stuff.
While CVPCB did indeed have a different hotkey for unit toggling, I don’t think
that’s a good enough reason to keep it. So I nuked its action in favour of
Common.Control.toggleUnits. Same for switching the cursor style.
As for the hotkey issues, I don’t think they’re worth addressing right now.
For 6.0 we’re planning on re-implementing hotkeys to just be keys assigned to
actions. The defaults will be defined in the action definitions (where we call
TOOL_ACTION::LegacyHotKey() today), and the config files will just be
{action-name, hotkey-sequence} tuples.
Cheers,
Jeff.
> On 31 May 2019, at 23:26, Ian McInerney <[email protected]> wrote:
>
> So, I have been able to implement the hotkeys I wanted (Jeff, thanks for the
> pointers), and those changes were in the patchset I just sent. However in
> doing so I discovered that the hotkey infrastructure for the footprint viewer
> window is broken/somewhat a mess. It seems that the hotkeys assigned to the
> CVPCB_ACTIONS work with their assigned hotkeys, but anything from the common
> tools library does not work (such as the zoom functions). Just to see, I
> tried hardcoding the hotkey for zoom to fit to WXK_HOME in actions.cpp, and
> then it worked in the footprint viewer. So it seems that cvpcb is not setup
> to have the proper hotkey bindings for these actions since they are defined
> using a TOOL_ACTION::LegacyHotKey() call.
>
> Additionally, is there a reason to leave cvpcb with its own change units
> action instead of using Common.Control.toggleUnits? The current change units
> toggles the units, but does not toggle the highlighted buttons on the toolbar
> to the left. The cvpcb action also has a different hotkey than the one that
> is used in eeschema/pcbnew (cvpcb has U hardcoded while the others have
> Ctrl-U).
>
> The hotkey issues exist in both the 5.1 and master branches, so it is
> necessary to decide if this is something that should be fixed in 5.1 or just
> left to fix in the 6.0 branch (if the latter, then the text for the buttons
> should be changed to remove the hotkey indication).
>
> I am willing to take on this work, but I would appreciate some guidance as to
> how to move forward (w.r.t to the 5.1/6.0 fixes and with how to get the
> hotkeys into the common tools for cvpcb). I think it would also make the most
> sense if we could standardize these hotkeys with those of pcbnew.
>
> -Ian
>
> On Tue, May 28, 2019 at 7:46 PM Jeff Young <[email protected]
> <mailto:[email protected]>> wrote:
> D’oh. You’re right: the whole tool framework in cvPCB is just for the
> Footprint Viewer window.
>
> Give a holler if you get stuck.
>
> Cheers,
> Jeff.
>
>> On 28 May 2019, at 19:17, Ian McInerney <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Jeff,
>>
>> Thanks for the pointer. I looked through the CVPCB_ACTIONS code last night,
>> and I came to the conclusion that it is only active in the footprint viewer
>> window (that seems to be where the tool manager for them is instantiated).
>> (also those tools also don't seem to have a user-configurable hotkey either)
>> . I think addding the copy/paste/delete as tools would require some
>> refactoring of the current action code, which I would like to avoid.
>>
>> The method you pointed to in the other window object looks like a good fit
>> for cvpcb (there aren't going to be many hotkeys, and the ones there are
>> will be pretty standard). So I will give that method a try and see how it
>> goes.
>>
>> Thanks,
>> -Ian
>>
>> On Tue, 28 May 2019, 4:07 p.m. Jeff Young, <[email protected]
>> <mailto:[email protected]>> wrote:
>> Hi Ian,
>>
>> The tool architecture allows hotkeys to be assigned to ACTIONs, which are
>> then executed by a TOOL. So you’d need to define cut/copy/paste
>> CVPCB_ACTIONs, and also give cvPCB a hotkeys file (and allow them to be
>> edited).
>>
>> But I don’t think we need to support editable hotkeys for
>> cut/copy/paste/delete. I’d be more inclined to do a light-weight solution
>> inside the wxWidget. See GRID_TRICKS for an example.
>>
>> Cheers,
>> Jeff.
>>
>>
>> > On 28 May 2019, at 13:29, Ian McInerney <[email protected]
>> > <mailto:[email protected]>> wrote:
>> >
>> > I am currently looking into adding some usability features to cvPCB
>> > (copy/paste, single association delete, etc.) and want to also include the
>> > relevant hotkey assignments for them. I am slightly confused where the
>> > hotkey handling for cvPCB is handled though, since I can't see any
>> > handling for it in the mainframe class. I do see that the tool manager
>> > exists for the footprint preview frame, so it can handle those hotkeys.
>> > Does anyone recall if cvPCB has hotkey handling in the mainframe already?
>> >
>> > Thanks,
>> > -Ian
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~kicad-developers
>> > <https://launchpad.net/~kicad-developers>
>> > Post to : [email protected]
>> > <mailto:[email protected]>
>> > Unsubscribe : https://launchpad.net/~kicad-developers
>> > <https://launchpad.net/~kicad-developers>
>> > More help : https://help.launchpad.net/ListHelp
>> > <https://help.launchpad.net/ListHelp>
>>
>
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp