switcher in ubuntu requres ctrl-Enter but windows requires just Enter
已回答
Hi, this is kinda irritating since I switch between ubuntu and windows frequently. I use modified emacs keybindings, and have loaded it in both OS environments. When I activate switcher I can move up or down the file list the same in either OS, but to select a file (i.e. go to its editor window), ubuntu only works with ctrl-enter and windows only works with enter. I've searched the keymaps but haven't found anything that might control this, certainly nothing in the section "Switcher(RecentFiles) Actions".
Anybody know where to set the select/activate/whatever key for Switcher?
请先登录再写评论。
Could you describe your workflow a bit more? A short screencast showing actual/expected would help to fully understand you case.
In order to use Switcher on Windows you have to keep Ctrl pressed. Otherwise, the Switcher Window will be closed automatically if you release Ctrl and the selected item will be opened. So, Ctrl + Enter is used on Windows by default for opening the selected item from the list
The same logic works for other OS
Thanks Egor, you're right I didn't notice that the actual difference is that on ubuntu I open switcher then release the ctrl key but the window stays. Then I have to hit ctrl-enter to select one of the choices. On windows releasing ctrl closes the window as you mentioned.
Could you clarify how exactly you open the Switcher popup on Ubuntu?
In my environment, if I use Ctrl + X, B shortcut, the Switcher popup will be closed the same way as on Windows if Ctrl key is not pressed
Also, please share information from Ubuntu IDE instance (Help | About) to better understand your setup
Ok, it seems the behavior is different depending on whether the Ctrl key is held down when pressing the B.
On Windows:
Ctrl-X, B: switcher opens, stays open until I select a file and hit Enter
Ctrl-X, Ctrl-B: switcher opens, stays open only while I HOLD down Ctrl, selects the file when I release Ctrl
On Ubuntu:
Ctrl-X, B: switcher opens, stays open until I select a file and hit Enter
Ctrl-X, Ctrl-B: switcher opens, stays open after releasing Ctrl, select a file and hit Ctrl-Enter (regular Enter does NOT work)
Here's the Help->About from ubuntu pycharm:
PyCharm 2023.1.3 (Professional Edition)
Build #PY-231.9161.41, built on June 20, 2023
Licensed to Keith Freeman
Subscription is active until January 30, 2024.
Runtime version: 17.0.7+10-b829.16 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.19.0-46-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Non-Bundled Plugins:
com.godwin.json.parser (1.4.1)
net.seesharpsoft.intellij.plugins.csv (3.2.0-231)
ru.adelf.idea.dotenv (2023.1)
Current Desktop: ubuntu:GNOME
Please specify your Linux version and if you have Wayland or x11 (echo $XDG_SESSION_TYPE).
This was not reproduced for me on Ubuntu22 + Gnome on x11
Sure:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
~ $ echo $XDG_SESSION_TYPE
x11
~ $ uname -a
Linux odysseus 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
We managed to reproduce your issue on our side, but only with the following key presses:
switcher opens, stays open after releasing Ctrl, select a file and hit Ctrl-Enter
Only if I push down Ctrl, then down X, press down and up B, then up X, then up Ctrl. In this case, Enter is not closing the dialog. This is the expected behavior.
Can you please double-check that this is not your case?
It appears that you tweaked your Linux settings. Here is how it works on the out-of-box Ubuntu for us (the same as in your Windows):
I guess you're right about Ctl-X,B. But I tweaked settings on both windows and ubuntu to set Ctl-H to bring up switcher, and it behaves differently. Shouldn't it behave the same with Ctl-H assigned to switcher no matter which OS I'm on?
I understand this isn't a super-serious bug, but it is annoying to have different behavior with the same settings :)
My colleague and I tried to reproduce this issue, but for us, Linux behavior was no different from Windows. It appears, that some of your Linux settings modified your keyboard reactions. Also, please check your remote client (if you connect with one), your VM keyboard settings (if you use virtualization), and keyboard tweaking software, such as Synergy/Barrier (if any).