Re: [Kicad-developers] Adding global mouse shortcuts in GAL tool framework

2018-11-24 Thread Maciej Suminski
Hi John, I am glad you like the idea. I agree it is better to wait until the legacy canvas removal, it feels like we are quite close to reaching that point. Cheers, Orson On 11/23/18 10:04 PM, John Beard wrote: > Hi Orson, > > Thanks for the idea - seems like that could be a fairly flexible way

Re: [Kicad-developers] Adding global mouse shortcuts in GAL tool framework

2018-11-23 Thread John Beard
Hi Orson, Thanks for the idea - seems like that could be a fairly flexible way to generalise action shortcuts. Perhaps such a refactor would be better after the hotkeys aren't synced with legacy, though. Cheers, John On Fri, Nov 23, 2018 at 8:58 AM Maciej Sumiński wrote: > > Hi John, > > One p

Re: [Kicad-developers] Adding global mouse shortcuts in GAL tool framework

2018-11-23 Thread Maciej Sumiński
Hi John, One possible way of solving the problem is to change the m_defaultHotkey in TOOL_ACTION class to a TOOL_EVENT field which says what triggers the action. Then ACTION_MANAGER instead of comparing hotkeys should run TOOL_EVENT::Matches() to check whether a processed TOOL_EVENT is supposed to

[Kicad-developers] Adding global mouse shortcuts in GAL tool framework

2018-11-21 Thread John Beard
Hi, A little technical query provoked by someone else's question, which I was unable to answer. Say one wanted to add a global mouse shortcut, for example, double middle-click to do "zoom-to-fit" [1]. The current mouse events are handled on a contextual basis in the event loops for each tool. Th