aboutsummaryrefslogtreecommitdiff
path: root/src/keys.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-06-09 21:52:14 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-06-25 20:45:21 +0200
commit06f9083bdeb085b7b9de762fa029f6519e142dbe (patch)
treeb3efca1e52e04f11a2087696d643d3ccfb84993d /src/keys.cc
parent52d9a4726da51b78bc5ed445588efb17f5f4e637 (diff)
Add support for zoom factor
Allows zooming in and out of pages by changing the size of all elements, including font size, images and tables. The initial zoom is specified in the "zoom_factor" option of dillorc. Use the new shortcuts Ctrl+ and Ctrl- to adjust the zoom of the current page and Ctrl 0 to reset it to 100%. When a new tab or window is opened, the current zoom factor is inherited. Each tab retains its own zoom factor. Fixes: https://github.com/dillo-browser/dillo/issues/21
Diffstat (limited to 'src/keys.cc')
-rw-r--r--src/keys.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/keys.cc b/src/keys.cc
index a512b8ea..7346706e 100644
--- a/src/keys.cc
+++ b/src/keys.cc
@@ -2,6 +2,7 @@
* Key parser
*
* Copyright (C) 2009 Jorge Arellano Cid <jcid@dillo.org>
+ * Copyright (C) 2024 Rodrigo Arias Mallo <rodarima@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -136,6 +137,10 @@ static const KeyBinding_t default_keys[] = {
{ "right" , KEYS_RIGHT , 0 , FL_Right },
{ "top" , KEYS_TOP , 0 , FL_Home },
{ "bottom" , KEYS_BOTTOM , 0 , FL_End },
+ { "zoom-in" , KEYS_ZOOM_IN , FL_CTRL , '+' },
+ { "zoom-in" , KEYS_ZOOM_IN , FL_CTRL , '=' /* US + */ },
+ { "zoom-out" , KEYS_ZOOM_OUT , FL_CTRL , '-' },
+ { "zoom-reset" , KEYS_ZOOM_RESET , FL_CTRL , '0' },
};
static Dlist *bindings;