From 37fefc85a9a23be7c3bc6dcddb8a30047459f534 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 26 Jan 2021 07:34:22 +0200 Subject: Keybindings for new tab, close tab, add bookmark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added new keybindings for opening and closing a tab. Also added a keybinding for adding a bookmark so ⌘D can be made available. On macOS, there is a default Window > Close menu item, so treat that as a "tabs.close" command to make it bindable. IssueID #121 --- src/ui/keys.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/keys.h') diff --git a/src/ui/keys.h b/src/ui/keys.h index 8bcd4f53..f6f0b465 100644 --- a/src/ui/keys.h +++ b/src/ui/keys.h @@ -28,6 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if defined (iPlatformApple) # define reload_KeyShortcut SDLK_r, KMOD_PRIMARY +# define newTab_KeyShortcut SDLK_t, KMOD_PRIMARY +# define closeTab_KeyShortcut SDLK_w, KMOD_PRIMARY # define prevTab_KeyShortcut SDLK_LEFTBRACKET, KMOD_SHIFT | KMOD_PRIMARY # define nextTab_KeyShortcut SDLK_RIGHTBRACKET, KMOD_SHIFT | KMOD_PRIMARY # define navigateBack_KeyShortcut SDLK_LEFT, KMOD_PRIMARY @@ -40,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ # define subscribeToPage_KeyModifier SDLK_d, KMOD_SHIFT | KMOD_PRIMARY #else # define reload_KeyShortcut SDLK_r, KMOD_PRIMARY +# define newTab_KeyShortcut SDLK_t, KMOD_PRIMARY +# define closeTab_KeyShortcut SDLK_w, KMOD_PRIMARY # define prevTab_KeyShortcut SDLK_PAGEUP, KMOD_PRIMARY # define nextTab_KeyShortcut SDLK_PAGEDOWN, KMOD_PRIMARY # define navigateBack_KeyShortcut SDLK_LEFT, KMOD_ALT -- cgit v1.2.3