PCBNew - shifted-hotkeys don't work when running a tool

Bug #1836903 reported by Art
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Medium
Jeff Young

Bug Description

I think a submitted a similar bug report before, but it seems it reappeared again. If I try to route a track, the "+" and "-" keys on the D-pad don't change the layers anymore. The only key that still works is "-" on the regular keyboard (top raw, the key right after "0"). Interestingly enough the "+" key on the regular keyboard doesn't work (by itself or with a shift). If I'm trying to change layers in a regular mode (not trying to route), everything works fine and D-pad "+" and "-" increment and decrement layers just fine. However, regular "+" still doesn't work here.

Application: KiCad
Version: (5.1.0-1292-g920f128cc), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: hotkeys pcbnew ui
Revision history for this message
Art (diametrix) wrote :

Correction for my last statement for the non-routing mode. "+" on the regular keyboard works with a Shift when you are not trying to route.

tags: added: hotkeys pcbnew ui
Revision history for this message
Art (diametrix) wrote :

Anybody? Seems like should be an easy fix

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Can confirm + hotkey to change layer doesn't work while routing (I'm using a MacBook Pro keyboard, so can't comment on num pad keys).

Application: Pcbnew
Version: (5.1.0-1360-g6b031d9b9-dirty), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.70.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 10.0.1 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=OFF
    KICAD_SCRIPTING_MODULES=OFF
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Changed in kicad:
importance: Undecided → Low
milestone: none → 6.0.0-rc1
status: New → Triaged
summary: - PCBNew - chan't change layers with keyboard shortcut while routing
+ PCBNew - can't change layers with keyboard shortcut while routing
Revision history for this message
Jeff Young (jeyjey) wrote : Re: PCBNew - can't change layers with keyboard shortcut while routing

The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation properly. wxEVT_CHAR does, but we only get to that if we skip the event at the end of the tool’s event processing loop, which most tools don’t do. (Selection tools, point editors, pickers, and a couple of others do skip, which is probably why this didn’t get reported earlier.)

I played around with a couple of ways to fix wxEVT_CHAR_HOOK. Most of them don’t work, and the few egregious hacks I tried weren't cross-platform.

So I’m changing it so that most tools now skip at the end of their event loops. I left out a couple that I felt were high risk (length tuning, for instance). But there’s still enough risk that I’m 100% sure it will break something, I just haven’t a clue what. So holler if you find anything that smells like it might be related.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
importance: Low → Medium
status: Triaged → In Progress
summary: - PCBNew - can't change layers with keyboard shortcut while routing
+ PCBNew - shifted-hotkeys don't work when running a tool
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 77334628c43c10da524e25ef40e2adb0d4c8f443
https://git.launchpad.net/kicad/patch/?id=77334628c43c10da524e25ef40e2adb0d4c8f443

Changed in kicad:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.