DEV Community

Rogério Ramos
Rogério Ramos

Posted on

Ctrl+Alt+Arrow (Right, Left) not working on IntelliJ

This post aims to be just a quick tip for those facing the same issue as I was facing.
It seems just a stupid and not critical issue but it affects my productivity quite a lot and searching around I couldn't find a help directly to my problem but combining tips and and there I was able to figure out my issue

Lately I decide to refresh all my laptops to GNU Arch Linux installations before I used to have Kali, Manjaro and Arch. Now I have streamlined my installations and yeah the family at home had to overcome any barrier of using a GNU Linux box, even my little that is going to turn seven. For my surprise one of the my shortcuts were not working as usually does before

Going directly to the problem the configurations on my system was hiding some shortcut configs so it took me some time to realize that something was not correct
There is a very common shortcut conflict between Gnome and IntelliJ (when using the Xwin keymap). Gnome workspace switch to left|right (Settings -> Keyboard -> Keyboard Shortcuts) shares the same key combination* as IntelliJ (Xwin) navigate back and forward (File -> Navigate -> Back|Forward) which is the subject of this post

Image description

As one can see the configuration only shows one shortcut assigned to switching workspaces, when in fact 3 was set for moving to right and other 3 to left. The only way to discover it was to follow some tips like here and check the shortcuts under the table

user> $ gsettings get org.gnome.desktop.wm.keybindings \
switch-to-workspace-left
['<Super>Page_Up', '<Super><Alt>Left', '<Control><Alt>Left']
Enter fullscreen mode Exit fullscreen mode
user> $ gsettings get org.gnome.desktop.wm.keybindings \
switch-to-workspace-right 
['<Super>Page_Down', '<Super><Alt>Right', '<Control><Alt>Right']
Enter fullscreen mode Exit fullscreen mode

So as one can realize the configuration is shown in the screen only the first shortcut <Super>Page_Down and <Super>Page_Up but in the end other shortcuts were there hidden and provoking the malfunctioning behavior

Fixing is pretty easy when you know the reason, so just matter of remove/add the desired shortcuts

user> $ gsettings set org.gnome.desktop.wm.keybindings \
switch-to-workspace-right "['<Super>Page_Down', '<Super><Alt>Right']"
Enter fullscreen mode Exit fullscreen mode
user> $ gsettings set org.gnome.desktop.wm.keybindings \
switch-to-workspace-left "['<Super>Page_Up', '<Super><Alt>Left']"
Enter fullscreen mode Exit fullscreen mode

The final result was that everything works as expected and may be the next step suggest or even add contributions to Gnome project to have all shortcuts displayed in the configuration to prevent issues like this

* Ctrl+Alt+Left, Ctrl+Alt+Right

The AI era means ongoing career reinvention. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay