GNOME Bugzilla – Bug 752666
No way to customize key bindings
Last modified: 2021-06-18 15:54:18 UTC
We used to be able to use .config/nautilus/accels to customize keybindings. According to António Fernandes, this was removed with the switch to GAction (see more information at this bug https://bugzilla.gnome.org/show_bug.cgi?id=750107). Not everyone agrees with the standard set of keybindings so there should be a way to customize them reintroduced.
This can also be solved by a Python plugin. Nautilus's Application class has a method to add an accelerator which in turn calls GtkApplication's set_accels_for_action. By using Nautilus-Python, a simple code with: app.set_accels_for_action( "win.up", ["BackSpace"] ) would do the work. This can be a temporary work-around.
Sorry guys, my last comment might sound a little "off" here. To clear things up, I should mention that I was thinking specifically about the BackSpace shortcut key in Nautilus. It was the first thing that eventually took me here.
(In reply to Ricardo Lenz) > > I was thinking specifically about the BackSpace shortcut key in Nautilus. that's what lead most people here (see Bug 679822 and all the duplicate reports) > > app.set_accels_for_action( "win.up", ["BackSpace"] ) how would this work in practice? what to do with this line?
I have made an example here: https://github.com/riclc/nautilus_backspace (sorry if it is not allowed to post links like that here) Anyway, you can download the file and put it in .local/share/nautilus-python/extensions/ and restart Nautilus. Now BackSpace should work :) Note: I didn't test it very much. But I think it is a temporary work-around for people who want to use just the right hand to navigate dirs (BackSpace, Return and the arrows are all things I can use with just my right hand on the keyboard).
thanks! Yes, I think that's the key issue : one-hand keyboard navigation.
Would be good to sync with what gnome-builder is planning for shortcuts customization and do the same for Nautilus. The config file for accels that was previous present in Nautilus was not discoverable at all, and now it clashes with the "keyboard shortcuts" window. So that needs to be taken care of.
*** Bug 749250 has been marked as a duplicate of this bug. ***
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.