← Back to team overview

kicad-developers team mailing list archive

Re: Tool processing & RunHotKey return


I think JP ran into this earlier, so he might know more about it.

Another issue might be that at the end of the tool loop the event will get skipped which will send it to wxWidgets for processing (at which point it will probably come back as a hotkey again).  We might already have logic to deal with that, but it’s something to look out for.

At the end of the day, though, we need to design around what is “right”.  If what’s right breaks other stuff then we need to fix the other stuff.


> On 27 Jul 2019, at 17:48, Ian McInerney <Ian.S.McInerney@xxxxxxxx> wrote:
> In the tool dispatcher currently, if any action is associated with a key combination (even if the action is not handled by any active tools) then a key event with that combination will not progress further than the dispatchHotKey function in the dispatcher. For instance, this means that the letter 'B' will not make it into any of the dispatchInternal calls inside any program (e.g. eeschema, pleditor, cvpcb, etc.) because it is assigned to a pcbnew action to refill the zones, even when those other programs do not use that action at all so it goes unhandled in the dispatchHotkey function. That event therefore is inaccessible in any tool loops that may be running.
> Is there a reason the dispatchHotkey logic looks only at the fact an action with that hotkey exists rather than if any tool has handled the associated action? For my work in cvpcb it would be better if it were the latter, so that any key events not handled by the tools continue processing (e.g. for down/up/left/right keys, single letter keys, etc.). It should be possible to know if the action is handled by the hotkey handler, since they actions are spawned immediately and the handled return value is then available.
> Would a change to this system break any of the existing tool loops? e.g., are any unable to cope with receiving key pressed events (I don't think any would be problematic, since some keys such as 'C' don't have an associated action and would therefore generate key pressed events in them)?
> -Ian
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

Follow ups