diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-23 10:29:14 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-23 10:29:14 +0200 |
commit | 6c6f7a0303405536f634d0f694288c79f076edda (patch) | |
tree | a75d795ea4d09099ec8adc418ddc20ef83fd720a /src/ui/keys.c | |
parent | 244599398b8fa457a160077513456b4b274d386d (diff) |
Lang: Applied string IDs everywhere
More or less everywhere?
IssueID #192
Diffstat (limited to 'src/ui/keys.c')
-rw-r--r-- | src/ui/keys.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/ui/keys.c b/src/ui/keys.c index 4d3f79f7..f59c5997 100644 --- a/src/ui/keys.c +++ b/src/ui/keys.c | |||
@@ -192,37 +192,37 @@ enum iBindFlag { | |||
192 | /* TODO: This indirection could be used for localization, although all UI strings | 192 | /* TODO: This indirection could be used for localization, although all UI strings |
193 | would need to be similarly handled. */ | 193 | would need to be similarly handled. */ |
194 | static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] = { | 194 | static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] = { |
195 | { 1, { "Jump to top", SDLK_HOME, 0, "scroll.top" }, 0 }, | 195 | { 1, { "${keys.top}", SDLK_HOME, 0, "scroll.top" }, 0 }, |
196 | { 2, { "Jump to bottom", SDLK_END, 0, "scroll.bottom" }, 0 }, | 196 | { 2, { "${keys.bottom}", SDLK_END, 0, "scroll.bottom" }, 0 }, |
197 | { 10, { "Scroll up", SDLK_UP, 0, "scroll.step arg:-1" }, argRepeat_BindFlag }, | 197 | { 10, { "${keys.scroll.up}", SDLK_UP, 0, "scroll.step arg:-1" }, argRepeat_BindFlag }, |
198 | { 11, { "Scroll down", SDLK_DOWN, 0, "scroll.step arg:1" }, argRepeat_BindFlag }, | 198 | { 11, { "${keys.scroll.down}", SDLK_DOWN, 0, "scroll.step arg:1" }, argRepeat_BindFlag }, |
199 | { 22, { "Scroll up half a page", SDLK_SPACE, KMOD_SHIFT, "scroll.page arg:-1" }, argRepeat_BindFlag }, | 199 | { 22, { "${keys.scroll.halfpage.up}", SDLK_SPACE, KMOD_SHIFT, "scroll.page arg:-1" }, argRepeat_BindFlag }, |
200 | { 23, { "Scroll down half a page", SDLK_SPACE, 0, "scroll.page arg:1" }, argRepeat_BindFlag }, | 200 | { 23, { "${keys.scroll.halfpage.down}", SDLK_SPACE, 0, "scroll.page arg:1" }, argRepeat_BindFlag }, |
201 | { 24, { "Scroll up a page", SDLK_PAGEUP, 0, "scroll.page arg:-1 full:1" }, argRepeat_BindFlag }, | 201 | { 24, { "${keys.scroll.page.up}", SDLK_PAGEUP, 0, "scroll.page arg:-1 full:1" }, argRepeat_BindFlag }, |
202 | { 25, { "Scroll down a page", SDLK_PAGEDOWN, 0, "scroll.page arg:1 full:1" }, argRepeat_BindFlag }, | 202 | { 25, { "${keys.scroll.page.down}", SDLK_PAGEDOWN, 0, "scroll.page arg:1 full:1" }, argRepeat_BindFlag }, |
203 | { 30, { "Go back", navigateBack_KeyShortcut, "navigate.back" }, 0 }, | 203 | { 30, { "${keys.back}", navigateBack_KeyShortcut, "navigate.back" }, 0 }, |
204 | { 31, { "Go forward", navigateForward_KeyShortcut, "navigate.forward" }, 0 }, | 204 | { 31, { "${keys.forward}", navigateForward_KeyShortcut, "navigate.forward" }, 0 }, |
205 | { 32, { "Go to parent directory", navigateParent_KeyShortcut, "navigate.parent" }, 0 }, | 205 | { 32, { "${keys.parent}", navigateParent_KeyShortcut, "navigate.parent" }, 0 }, |
206 | { 33, { "Go to site root", navigateRoot_KeyShortcut, "navigate.root" }, 0 }, | 206 | { 33, { "${keys.root}", navigateRoot_KeyShortcut, "navigate.root" }, 0 }, |
207 | { 35, { "Reload page", reload_KeyShortcut, "document.reload" }, 0 }, | 207 | { 35, { "${keys.reload}", reload_KeyShortcut, "document.reload" }, 0 }, |
208 | { 41, { "Open link via modifier key", SDLK_LALT, 0, "document.linkkeys arg:0" }, argRelease_BindFlag }, | 208 | { 41, { "${keys.link.modkey}", SDLK_LALT, 0, "document.linkkeys arg:0" }, argRelease_BindFlag }, |
209 | { 42, { "Open link via home row keys", 'f', 0, "document.linkkeys arg:1" }, 0 }, | 209 | { 42, { "${keys.link.homerow}", 'f', 0, "document.linkkeys arg:1" }, 0 }, |
210 | { 45, { "Open link in new tab via home row keys", 'f', KMOD_SHIFT, "document.linkkeys arg:1 newtab:1" }, 0 }, | 210 | { 45, { "${keys.link.homerow.newtab}", 'f', KMOD_SHIFT, "document.linkkeys arg:1 newtab:1" }, 0 }, |
211 | { 46, { "Hover on link via home row keys", 'h', 0, "document.linkkeys arg:1 hover:1" }, 0 }, | 211 | { 46, { "${keys.link.homerow.hover}", 'h', 0, "document.linkkeys arg:1 hover:1" }, 0 }, |
212 | { 47, { "Next set of home row key links", '.', 0, "document.linkkeys more:1" }, 0 }, | 212 | { 47, { "${keys.link.homerow.next}", '.', 0, "document.linkkeys more:1" }, 0 }, |
213 | { 50, { "Add bookmark", 'd', KMOD_PRIMARY, "bookmark.add" }, 0 }, | 213 | { 50, { "${keys.bookmark.add}", 'd', KMOD_PRIMARY, "bookmark.add" }, 0 }, |
214 | { 60, { "Find text on page", 'f', KMOD_PRIMARY, "focus.set id:find.input" }, 0 }, | 214 | { 60, { "${keys.findtext}", 'f', KMOD_PRIMARY, "focus.set id:find.input" }, 0 }, |
215 | { 70, { "Zoom in", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, 0 }, | 215 | { 70, { "${keys.zoom.in}", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, 0 }, |
216 | { 71, { "Zoom out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, 0 }, | 216 | { 71, { "${keys.zoom.out}", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, 0 }, |
217 | { 72, { "Reset zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, 0 }, | 217 | { 72, { "${keys.zoom.reset}", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, 0 }, |
218 | #if !defined (iPlatformApple) /* Ctrl-Cmd-F on macOS */ | 218 | #if !defined (iPlatformApple) /* Ctrl-Cmd-F on macOS */ |
219 | { 73, { "Toggle fullscreen mode", SDLK_F11, 0, "window.fullscreen" }, 0 }, | 219 | { 73, { "${keys.fullscreen}", SDLK_F11, 0, "window.fullscreen" }, 0 }, |
220 | #endif | 220 | #endif |
221 | { 76, { "New tab", newTab_KeyShortcut, "tabs.new" }, 0 }, | 221 | { 76, { "${keys.tab.new}", newTab_KeyShortcut, "tabs.new" }, 0 }, |
222 | { 77, { "Close tab", closeTab_KeyShortcut, "tabs.close" }, 0 }, | 222 | { 77, { "${keys.tab.close}", closeTab_KeyShortcut, "tabs.close" }, 0 }, |
223 | { 80, { "Previous tab", prevTab_KeyShortcut, "tabs.prev" }, 0 }, | 223 | { 80, { "${keys.tab.prev}", prevTab_KeyShortcut, "tabs.prev" }, 0 }, |
224 | { 81, { "Next tab", nextTab_KeyShortcut, "tabs.next" }, 0 }, | 224 | { 81, { "${keys.tab.next}", nextTab_KeyShortcut, "tabs.next" }, 0 }, |
225 | { 100,{ "Toggle show URL on hover", '/', KMOD_PRIMARY, "prefs.hoverlink.toggle" }, 0 }, | 225 | { 100,{ "${keys.hoverurl}", '/', KMOD_PRIMARY, "prefs.hoverlink.toggle" }, 0 }, |
226 | /* The following cannot currently be changed (built-in duplicates). */ | 226 | /* The following cannot currently be changed (built-in duplicates). */ |
227 | #if defined (iPlatformApple) | 227 | #if defined (iPlatformApple) |
228 | { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, | 228 | { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, |