Skip to content

Change the shortcut for Focus Sidebar to not interfere with text editing#2796

Open
stan-janssen wants to merge 1 commit into
elementary:mainfrom
stan-janssen:focus-sidebar-shortcut
Open

Change the shortcut for Focus Sidebar to not interfere with text editing#2796
stan-janssen wants to merge 1 commit into
elementary:mainfrom
stan-janssen:focus-sidebar-shortcut

Conversation

@stan-janssen
Copy link
Copy Markdown

The existing <Ctrl> + Left would interfere when editing a filename.

Closes #2677.

@jeremypw
Copy link
Copy Markdown
Contributor

See also elementary/code#1719. It would be good to agree on a common shortcut to switch to and from the sidebar. I think <Ctrl><Alt>Left <Ctrl><Alt>Right is more memorable on balance. Not sure how to make these shortcuts discoverable though.

@stan-janssen
Copy link
Copy Markdown
Author

Thanks, I will update this PR to change the keyboard shortcut to <Ctrl><Alt>Left.

The existing <ctrl>+Left would interfere when editing a filename

Closes elementary#2677.
@stan-janssen stan-janssen force-pushed the focus-sidebar-shortcut branch from c09998d to c78645f Compare May 19, 2026 10:29
@stan-janssen
Copy link
Copy Markdown
Author

(A thing that comes to mind: do people with a RTL (Right-To-Left) setting see the sidebar on the right side? And isn't a fixed directional-key shortcut confusing in that case? I assume that this won't be the only place this is encountered...)

@Dipanshusinghh
Copy link
Copy Markdown

Heiy everyone.
It’s great to see we are keeping the keyboard shortcuts consistent across the elementary ecosystem. Using Left and Right has felt quite natural while implementing it in Code (#1719)..
Regarding the RTL layout question, that's a very valid and interesting point! I imagine GTK might handle flipping directional keybindings automatically based on the system's text direction, but it's definitely something good to keep an eye on for the future..
Thanks for working on this

@stan-janssen
Copy link
Copy Markdown
Author

I installed the Arabic language and took a look, and indeed the sidebar is on the right, and I still have to press <Ctrl><Alt>Left to get to it, which is not great. The same goes for navigating in column view by the way, the right arrow opens a new column (on the left).

I don't think this should block this PR, because it is not a regression to the current status, but I wonder if there is something in some of the underlying libraries that might help with abstracting this. If there isn't, perhaps directional arrow keys should only be used very cautiously in shortcuts.

@stan-janssen stan-janssen requested a review from jeremypw May 19, 2026 14:58
@jeremypw
Copy link
Copy Markdown
Contributor

jeremypw commented May 19, 2026

I agree that dealing with RTL locales should be dealt with but can be done in another PR. It should be simple enough to alter the actions depending on the StateFlagsof the window (DIR_RTL or not).

Copy link
Copy Markdown
Contributor

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected, thanks. I think that we should change the corresponding <Ctrl>Right shortcut as well though to maintain consistency?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When renaming a file pressing CTRL+LEFT makes the focus move to the left column of Files

3 participants