ubuntu - 在 WSL2 中运行 IntelliJ - 如何使键盘快捷键 ctrl+alt+arrows 工作

标签 ubuntu intellij-idea windows-subsystem-for-linux gnome wsl-2

我的环境:

Windows 11 22000.493 -> Host OS
WSL 5.10.60.1
Ubuntu: 20.04.3 LTS -> Guest OS
IntelliJ: Build #IC-213.6777.52, built on January 28, 2022 -> Running inside WSL
我在 WSL 中运行 IntelliJ,如下所述:https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps
我已将 IntelliJ 配置为使用 Windows Proper Redo 键盘映射,以便我的快捷方式与 Windows 环境中的快捷方式相同。
除了导航快捷键 - Ctrl+Alt+Left/Right,所有快捷键似乎都按预期工作。
enter image description here
如屏幕截图所示 - 它们已正确配置。如果我切换组合 - 它们开始工作,但我想让它们在 Ctrl+Alt+Left/Right 下。
我在这里阅读 IntelliJ Idea Ctrl+Alt+Left shortcut doesn't work in Ubuntu Ctrl+Alt+Left/Right 正在干扰 Gnome,但这是 WSL,我已经按照 https://askubuntu.com/questions/767577/how-can-i-remove-gnome-desktop-environment-without-messing-unity-de-ubuntu-16 完全卸载了 Gnome并运行
sudo apt-get remove --auto-remove ubuntu-gnome-desktop
我的 Ubuntu 上似乎还有一些设置:
$ gsettings list-recursively | grep org.gnome.desktop.wm.keybindings | sort | grep Control
org.gnome.desktop.wm.keybindings cycle-panels ['<Control><Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-panels-backward ['<Shift><Control><Alt>Escape']
org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Super><Shift>Page_Down', '<Control><Shift><Alt>Down']
org.gnome.desktop.wm.keybindings move-to-workspace-left ['<Control><Shift><Alt>Left']
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Control><Shift><Alt>Right']
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Super><Shift>Page_Up', '<Control><Shift><Alt>Up']
org.gnome.desktop.wm.keybindings switch-panels ['<Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-panels-backward ['<Shift><Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Super>Page_Down', '<Control><Alt>Down']
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Super>Page_Up', '<Control><Alt>Up']
但是它们都没有绑定(bind)到 Ctrl+Alt+Left/Right。
我没主意了。如何使键盘组合在 WSL2 内运行的 IntelliJ 中工作?

最佳答案

您需要运行 WSL 版本 >=56.1,因为此版本使用 Microsoft 远程桌面客户端版本 1.2.2924,它支持 Ctrl+Alt+箭头键键盘快捷键。
https://github.com/microsoft/WSL/releases/tag/0.56.1
https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/windowsdesktop-whatsnew#updates-for-version-122924

关于ubuntu - 在 WSL2 中运行 IntelliJ - 如何使键盘快捷键 ctrl+alt+arrows 工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71144822/

相关文章:

python - pycharm 无法在 WSL 上使用远程 ssh python 解释器运行 .py 进行编码

python - PyPy 和 Python 版本

ubuntu - 设置 Varnish Apache2 HTTP & HTTPS Ubuntu 16.04

linux - 向要监控的Nagios服务发送请求

intellij-idea - IntelliJ GSDL : Define method with optional arguments

linux - Windows 10 上的 Ubuntu 上的 Bash 是否支持 USB?

使用 'ionic emulate android' 命令时 Android 模拟器不安装应用程序

java - Intellij 中的 Maven parent 和 child

java - Intellij 找不到我的 Spring Boot 应用程序

WSL 上的 Docker 不会绑定(bind)挂载 $HOME