Repository: spyder-ide/spyder

Issue:
The shortcuts for file switcher and symbol finder are not working
### What steps will reproduce the problem?

<!--- You can use Markdown here --->

Hello.
I installed spyder 5.0.5 in clean env and I executed "spyder --reset".
But Ctrl + P and Ctrl + alt + P are not working in editor.
Thanks.

---dependency---
# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.0 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.0.2 (OK)
IPython >=7.6.0               :  7.24.1 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.0.1 (OK)
nbconvert >=4.0               :  6.0.7 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
parso =0.7.0                  :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.9.0 (OK)
pylint >=1.0                  :  2.8.2 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.6 (OK)
pyls_spyder >=0.3.2;<0.4.0    :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.0 (OK)
qtawesome >=1.0.2             :  1.0.2 (OK)
qtconsole >=5.1.0             :  5.1.0 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=39.0.0           :  49.6.0.post20210108 (OK)
sphinx >=0.6.6                :  4.0.2 (OK)
spyder_kernels >=2.0.4;<2.1.0 :  2.0.4 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.2 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=17                      :  22.1.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  None (NOK)
numpy >=1.7                   :  1.20.2 (OK)
pandas >=1.1.1                :  None (NOK)
scipy >=0.17.0                :  1.6.2 (OK)
sympy >=0.7.3                 :  None (NOK)


Discussion:
Hey @ok97465, thanks for reporting. I'll try to fix this issue in our 5.1.0 version, to be released at the end of the month.
I am having the same issue, even in version 5.1.3. Any update on this? It makes it very tedious to efficiently browse large modules. 
You need to display the `File` menu on top. That makes the shortcuts work again.
This worked! Clicking once on the file menu button on top makes the symbol finder shortcut work again.
Is this expected to stay the same going forward or will it be fixed?
It will be fixed. That's why this issue is still open.
Thanks for the quick response. Truly appreciate all the hard work going into this.

Resolving patch:
diff --git a/spyder/plugins/mainmenu/plugin.py b/spyder/plugins/mainmenu/plugin.py
--- a/spyder/plugins/mainmenu/plugin.py
+++ b/spyder/plugins/mainmenu/plugin.py
@@ -80,9 +80,10 @@ def on_mainwindow_visible(self):
         # and "Preferences") are located in the right place in Mac's menu
         # bar.
         # Fixes spyder-ide/spyder#14917
-        if sys.platform == 'darwin':
-            for menu in self._APPLICATION_MENUS.values():
-                menu._render()
+        # This also registers shortcuts for actions that are only in menus.
+        # Fixes spyder-ide/spyder#16061
+        for menu in self._APPLICATION_MENUS.values():
+            menu._render()
 
     # ---- Private methods
     # ------------------------------------------------------------------------


Test patch: