diff options
author | António Fernandes <antoniof@gnome.org> | 2018-05-06 19:45:11 +0100 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2018-07-17 23:23:52 +0000 |
commit | ff776c252121710a73602d8affd3ba48af31dee6 (patch) | |
tree | d5e68cec05147be213709cf576397fda4c6afbb7 | |
parent | 04f3cb531d66c775f85b4faafa6764a292f68e9b (diff) | |
download | nautilus-ff776c252121710a73602d8affd3ba48af31dee6.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
(cherry picked from commit ab16292e698cbcfdbc2cd175cdeaac4a8a898a69)
-rw-r--r-- | src/nautilus-window.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 1f8d5208e..41c4623be 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -2335,6 +2335,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), @@ -2361,7 +2367,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"); |