6.99 Viewport hotkey doesn't work in Fedora 35 (was: hardcoded?)

Hi,

Is the hotkey for viewport switching hardcoded to Alt+Tab like in the screenshot below?
I don’t seem to find it in the Preferences → Hotkeys, neither by searching nor by looking through all the options manually.

In my case, running fedora 35 and KDE I can’t use this because that key combo switches application windows in KDE. It would be very convenient to be able to set a hotkey manually to something else.

Also:
It seems that some of the text is not correctly updated when I change language between swedish and english; for example in the screenshot below:
“Inaktiva lager (H):”
“Urvalsfilter”
And also in the version info it says “KiCad mönsterkortsredigerare” in swedish instead of PCB Editor, even though the rest of it is in english.
Is that a bug, i guess?

bild

Application: KiCad mönsterkortsredigerare

Version: 6.99.0-1.20220405git0bd3341.fc35, release build

Libraries:
wxWidgets 3.0.5
FreeType 2.11.0
HarfBuzz 2.9.1
FontConfig 2.13.94
libcurl/7.79.1 OpenSSL/1.1.1n-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.45.1 OpenLDAP/2.4.59

Platform: Linux 5.16.18-200.fc35.x86_64 x86_64, 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Apr 5 2022 17:16:47
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.79.1
ngspice: 36
Compiler: GCC 11.2.1 with C++ ABI 1016

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

I’m using Linux Mint here, and [Alt + Tab] is used by my OS to switch between open KiCad windows just as each was a separate program. So this is a function from the OS, and not from KiCad.

currently yes.

There is already a gitlab-issue to make this hotkey user-settable (albeit I can’t find it at the moment).
ALT+TAB is for windows-users also a bad decision (on windows alt+tab == program-switching/task-switching). So I couldnot really test this new feature. Using it with the right-side-panel saves not much of mouse-moving/scrolling, but I’m hoping for a nice hotkey for the future.

There is this one, which is somewhat similar but about Ctrl+Tab (which happens to work for me).

But I can’t find one on Alt+Tab either.
Did nobody use the viewport switching in KDE or Windows so far?

I understand that Alt+Tab has been application window switching in Windows since forever (decades), so I would consider it a serious issue to have a conflict with that.

I hope there would be some way to fix it in KiCad so the viewport switching would be usable with a hotkey.

As I recall, when the viewport switching feature was added that it was noted that it would need to be configurable, but that the configuration would be plumbed in later, possibly as part of broader hotkey configuration work.

But looking at the history for this I think it was changed from alt-tab to shift-tab; can you try that key combo and see if the GUI text just wasn’t updated to match? (see Don't bind to Alt+Tab (4a16c603) · Commits · KiCad / KiCad Source Code / kicad · GitLab)

Shift+Tab does something else; it seems to move around some kind of highlighting of objects in the user interface, so you can activate them with enter, arrow keys etc. This highlighting can go to both the layer presets and the viewport dropdown list, open the dropdown list with space, with the arrow keys you can choose options from the list and then press enter.
But it does not work the same way as Ctrl+Tab for layer presets, as I suppose it is meant to do.

I looked at the source code from that commit, and 4a16c603 is not the last commit on that issue.
The current version of the file pcbnew/pcb_base_edit_frame.cpp, accessible at:

contains the following preprocessor directives:

#ifdef WXMAC
wxKeyCode presetSwitchKey = WXK_RAW_CONTROL;
wxKeyCode viewSwitchKey = WXK_ALT;
#else
wxKeyCode presetSwitchKey = WXK_RAW_CONTROL;
wxKeyCode viewSwitchKey = WXK_WINDOWS_LEFT;
#endif

Indicating that on Mac the Alt+Tab is used, but on others the left windows key + tab.

Now unfortunately that doesn’t work for me either.
I don’t know exactly why, but if I press and release only the left windows key (laptop keyboard has no right one), the “start menu” in KDE comes up. (I suppose this is similar in Windows.)

If I press left windows+Tab in KiCad PCB editor, nothing happens.

Does it work for someone else, on any system / window manager?

It seems that in Windows, windows key + Tab is already assigned to cycling through the buttons on the taskbar, so there seems to be a potential conflict there too…
(See: Picture of Windows Keyboard - Explanation of Keys)

It also seems that KiCad doesn’t remember which viewport was active when the PCB Editor was last closed, or it doesn’t restore the same viewport at the next start, but defaults to “zoom to fit”.

I am a huge fan of restoring things to the same state as it was last time when restarting an application, so I would definitely vote in favour of remembering and restoring the viewport to the state it was last.

Okay; so here it says that in wx the keycodes for the windows keys (left, right and menu) are only generated under windows currently. That would of course make it not work in Linux, which is kind of unfortunate…

https://docs.wxpython.org/4.0.7/wx.KeyCode.enumeration.html

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.