← Back to team overview

kicad-developers team mailing list archive

Re: '/' hotkey

 

Hi Wayne,

wxTextCtrl doesn’t properly send a wxEVT_TEXT_ENTER when it’s multi-line.
The standard work-around is to add a character hook to get it.

It seems like those would all be in dialogs, though, and shouldn’t be affecting
the main frame.

Hmmm… I see there’s also an EDA_DRAW_FRAME char hook.  But it’s
pretty innocuous:

void EDA_DRAW_FRAME::OnCharHook( wxKeyEvent& event )
{
    // Key events can be filtered here.
    // Currently no filtering is made.
    event.Skip();
}

Still, might be somewhere to put a breakpoint and hope for more info….

Cheers,
Jeff.

> On 28 Feb 2018, at 16:45, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
> 
> In the process of attempting to fix this bug[1], I ran into an issue
> with the '/' hotkey for all main frames.  For some reason, the hotkey
> help dialog is being displayed for both '/' and '?' keys which broke the
> track posture switching in pcbnew.  This bug only seems to affect
> windows.  The attached patch fixes the issue but changes the menu entry
> shortcut text from '?' to 'shift+?' which would make pcbnew different
> from all of the other mainframe windows which is ugly but it's better
> than a broken hotkey.
> 
> While I was at it, I took a look at the schematic editor and sure enough
> the same behavior exists except that the same change as the attached
> patch does not fix the issue so the bus wire entry hotkey is broken.
> When I set a debugger breakpoint in the EDA_DRAW_PANEL::OnKeyEvent()
> function, it is not triggered for either a '/' key.  The '?' key does
> trigger the breakpoint.  Did someone create a character hook somewhere
> that could be preventing EDA_DRAW_PANEL from ever receiving the '/' key
> presses and passing them directly to the SCH_EDIT_FRAME?  I cannot find
> any reason why the EDA_DRAW_PANEL::OnKeyEvent() event handler is not
> being called for this key on windows.
> 
> Cheers,
> 
> Wayne
> 
> [1]: https://bugs.launchpad.net/kicad/+bug/1751812
> <fix-track-posture-hotkey.patch>_______________________________________________
> 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


References