summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2018-05-06 20:45:11 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2018-07-18 01:40:34 +0200
commit04ca0cd31285d82ea07677c6e42d79e1dd3bccbd (patch)
tree63adaa1a4804ffc1ca1560be09fff9a30498569a
parentf0dba17d16e743d54f027294fc2633443ac52966 (diff)
downloadnautilus-04ca0cd31285d82ea07677c6e42d79e1dd3bccbd.tar.gz
window: Allow dead_tilde key to trigger location entry
The standalone "~" key ("asciitilde") works as a convenient shortcut to type home-relative paths into the location entry. However, some keyboard layouts don't have an standalone "~" key but rather a "dead tilde" key. This makes the existing shortcut unavaliable for some keyboard layouts. This is surprising for most people, because they have a tilde key and the Keyboard Shortcuts window advertises a shortcut for the tilde key. So, add the dead tilde key as an alternative shortcut. Note: Searching for tilded characters or the tilde character itself is still possible by revealing the search entry is explicitly. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/372
-rw-r--r--src/nautilus-window.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 9eaae353c..0bff4e083 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2284,6 +2284,12 @@ nautilus_window_initialize_actions (NautilusWindow *window)
"<ctrl>r",
NULL
};
+ const gchar *prompt_home_location_accels[] =
+ {
+ "asciitilde",
+ "dead_tilde",
+ NULL
+ };
g_action_map_add_action_entries (G_ACTION_MAP (window),
win_entries, G_N_ELEMENTS (win_entries),
@@ -2310,7 +2316,8 @@ nautilus_window_initialize_actions (NautilusWindow *window)
nautilus_application_set_accelerator (app, "win.tab-move-left", "<shift><control>Page_Up");
nautilus_application_set_accelerator (app, "win.tab-move-right", "<shift><control>Page_Down");
nautilus_application_set_accelerator (app, "win.prompt-root-location", "slash");
- nautilus_application_set_accelerator (app, "win.prompt-home-location", "asciitilde");
+ /* Support keyboard layouts which have a dead tilde key but not a tilde key. */
+ nautilus_application_set_accelerators (app, "win.prompt-home-location", prompt_home_location_accels);
nautilus_application_set_accelerator (app, "win.view-menu", "F10");
nautilus_application_set_accelerator (app, "win.restore-tab", "<shift><control>t");