Keyboard shortcuts do not work with numlock on

Bug #1821730 reported by Mans Rullgard on 2019-03-26

This bug report will be marked for expiration in 6 days if no further activity occurs. (find out why)

This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When numlock is enabled, the keyboard shortcuts do not work in eeschema or pcbnew (including symbol/footprint editors). For example, pressing 'A' to place a component in eeschema does nothing. Some other keys perform an action other than the expected.

Currently running version 5.1.0. Bug has been present at least since 4.0.

Application: kicad
Version: 5.1.0, release build
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.0.2r zlib/1.2.11
Platform: Linux 4.14.62 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:

Laurent Haas (efcis) wrote :

You really mean *Num* lock ? Not *Caps* lock ? Either way, I can't reproduce on Windows 32-bit.

Mans Rullgard (mansr) wrote :

Yes, Num lock, the key at the top left of the number pad.

I suspect it has something to do with how the graphics widget library (wxWidgets) reports modifiers with key presses, which is likely system dependent.

That gave me an idea. If I use Xmodmap to move Num_Lock to the X11 Mod3 (it was Mod5), KiCad shortcuts start working. A little more poking suggests that something is treating Mod5 as equivalent to Alt, even though the assignments of keys to the Mod1-5 flags is arbitrary.

I have no experience programming with wxWidgets, so maybe the bug is there rather than in KiCad, though I've never noticed this problem with any other application.

Wayne Stambaugh (stambaughw) wrote :

I'm not seeing any issues with the normal shortcut keys such as 'A' on Debian testing so I'm wondering if there are some key mapping issues. Are you using a non-US keyboard? We have seen some issues with non-US keyboards.

Changed in kicad:
status: New → Incomplete
Mans Rullgard (mansr) wrote :

As I said, the problem seems to be related to how keys are assigned to the Mod1-5 flags. I have a slightly tweaked mapping, and apparently KiCad or wxWidgets doesn't like that. As I also said, I was able to shuffle the assignments in such a way that everything is working since all other applications correctly examine the mapping to determine which mod flag has what meaning.

You should be able to reproduce the behaviour by running xmodmap with this input:

  clear mod5
  add mod5 = Num_Lock

Since there is a simple workaround (don't assign Num_Lock to Mod5 (and probably not Mod1)), I'd give this low priority, even though I still consider it a bug.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers