Spyder: Give focus to the panes that users can interact with using the keyboard

Created on 7 Dec 2019  路  12Comments  路  Source: spyder-ide/spyder

Problem Description

The shortcut _switch to explorer_ (Ctrl+Shift+X) does not move the keyboard cursor to the correct window pane. This was working in Spyder 3.7

What steps reproduce the problem?

  1. Install spyder=4.0.0
  2. Try using Ctrl+Shift+X
  3. Cursor is still in last current pane

What is the expected output? What do you see instead?

The expected output is that after I hit the shortcut, I can use the keyboard to navigate the Explorer pane, however the cursor remains on the last-used pane.

Versions

  • Spyder version: 4.0.0
  • Python version: Python 3.6.9 64-bit
  • Qt version: Qt 5.9.6
  • PyQt version: PyQt5 5.9.2
  • Operating System name/version: Windows 2008ServerR2

Dependencies

cloudpickle >=0.5.0          :  1.2.2 (OK)
pygments >=2.0               :  2.5.2 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
sphinx >=0.6.6               :  2.2.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
psutil >=0.3                 :  5.6.7 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
zmq >=17                     :  18.1.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
qdarkstyle >=2.7             :  2.7 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
watchdog                     :  None (OK)
keyring                      :  None (OK)
pexpect >=4.4.0              :  4.7.0 (OK)
pympler                      :  None (OK)
sympy >=0.7.3                :  None (NOK)
cython >=0.21                :  None (NOK)
IPython >=4.0                :  7.10.1 (OK)
matplotlib >=2.0.0           :  3.1.1 (OK)
pandas >=0.13.1              :  0.25.3 (OK)
numpy >=1.7                  :  1.17.4 (OK)
scipy >=0.17.0               :  1.3.1 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.2 (OK)
rtree >=0.8.3                :  0.8.3 (OK)
Ui Bug

All 12 comments

I can replicate this. The problem is also occurring for the outline explorer.

@goanpeca @ccordoba12 Is keeping the focus on the Editor working as intended or is this a bug?

I will take a look. What do you think?

I will take a look. What do you think?

I think the focus should be given to the main widget of the plugin we are switching to.

I'll add to this and say that when in Console I can't switch to Editor using the Ctrl+Shift+E shortcut. Also using it to switch to Files, Help, Variable explorer activates these panes (I have them tabbed) but focus remains in the Console.

@gerazov, I can't reproduce that on Linux. Is your console undocked?

You're right - it only happens when I have a New Editor window. It works fine in the normal layout even with split views in the Editor.

And for the Files, Outline, Variable explorer I guess it's because they don't have keyboard navigation at all no?

@spyder-ide/core-developers, what do you think about giving focus to the panes that users can interact with using the keyboard (like the ones mentioned above by @gerazov)?

what do you think about giving focus to the panes that users can interact with using the keyboard (like the ones mentioned above by @gerazov)?

I agree that Spyder should strive to provide a way of using it without a mouse, so anything that allows for this I am 馃憤. This is in line with accessibility guidelines.

Also panels should allow for <Tab>navigation to move between the different widgets

I agree. Leaving this for 4.2.0 because it could require important changes to several panes (most probably not, but I want to be on the safe side here).

I seem to remember that fairly recently there was a discussion that for some panes like the new plot pane, we want Ctrl-Shift-G only to raise the pane if it is hidden underneath some other pane. You'd have to press it twice to switch focus. However, I can't quickly find that discussion anymore. Did I just dream it?

Did I just dream it?

No, you didn't. I also remember it too, but I don't recall its number.

Did I just dream it?

No, you didn't. I also remember it too, but I don't recall its number.

It was on Gitter. This behavior is already somewhat implemented for the plot pane, see PR #11684

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JesterEE picture JesterEE  路  3Comments

dalthviz picture dalthviz  路  3Comments

goanpeca picture goanpeca  路  3Comments

cchu08 picture cchu08  路  3Comments

zaroth picture zaroth  路  3Comments