diff --git a/CHANGELOG.md b/CHANGELOG.md index d3f5d119..3763aca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,9 @@ does the opposite ([#1584][1584]). * Grid is now always centered in the window, when either fullscreened or maximized. +* Ctrl+wheel up/down bound to `font-increase` and `font-decrease` + respectively (in addition to the already existing default key + bindings `ctrl-+` and `ctrl+-`). [1526]: https://codeberg.org/dnkl/foot/issues/1526 [1528]: https://codeberg.org/dnkl/foot/issues/1528 diff --git a/README.md b/README.md index 75e10889..b8d67e96 100644 --- a/README.md +++ b/README.md @@ -151,10 +151,10 @@ These are the default shortcuts. See `man foot.ini` and the example : Start a scrollback search ctrl++, ctrl+= -: Increase font size by 0,5pt +: Increase font size ctrl+- -: Decrease font size by 0,5pt +: Decrease font size ctrl+0 : Reset font size @@ -237,7 +237,11 @@ These are the default shortcuts. See `man foot.ini` and the example under the pointer up to, and until, the next space characters. left - **triple-click** -: Selects the entire row +: Selects the everything between enclosing quotes, or the entire row + if not inside a quote. + +left - **quad-click** +: Selects the entire row. middle : Paste from _primary_ selection @@ -247,9 +251,16 @@ These are the default shortcuts. See `man foot.ini` and the example selection, while hold-and-drag allows you to interactively resize the selection. +ctrl+right +: Extend the current selection, but force it to be character wise, + rather than depending on the original selection mode. + wheel : Scroll up/down in history +ctrl+wheel +: Increase/decrease font size + ### Touchscreen diff --git a/config.c b/config.c index 4945485e..6953e798 100644 --- a/config.c +++ b/config.c @@ -2989,6 +2989,8 @@ add_default_mouse_bindings(struct config *conf) {BIND_ACTION_SELECT_WORD_WS, m(XKB_MOD_NAME_CTRL), {.m = {BTN_LEFT, 2}}}, {BIND_ACTION_SELECT_QUOTE, m("none"), {.m = {BTN_LEFT, 3}}}, {BIND_ACTION_SELECT_ROW, m("none"), {.m = {BTN_LEFT, 4}}}, + {BIND_ACTION_FONT_SIZE_UP, m("Control"), {.m = {BTN_BACK, 1}}}, + {BIND_ACTION_FONT_SIZE_DOWN, m("Control"), {.m = {BTN_FORWARD, 1}}}, }; conf->bindings.mouse.count = ALEN(bindings); diff --git a/doc/foot.1.scd b/doc/foot.1.scd index 73c0c2b1..8e2e6a48 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -183,16 +183,16 @@ default) available; see *foot.ini*(5). Paste from _clipboard_ *shift*+*insert* - Paste from the _primary selection_. + Paste from the _primary selection_ *ctrl*+*shift*+*r* Start a scrollback search *ctrl*+*+*, *ctrl*+*=* - Increase font size by 0.5pt + Increase font size *ctrl*+*-* - Decrease font size by 0.5pt + Decrease font size *ctrl*+*0* Reset font size @@ -273,6 +273,10 @@ default) available; see *foot.ini*(5). characters. *left*, triple-click + Selects the everything between enclosing quotes, or the entire row + if not inside a quote. + +*left*, quad-click Selects the entire row *middle* @@ -283,9 +287,16 @@ default) available; see *foot.ini*(5). selection, while hold-and-drag allows you to interactively resize the selection. +*ctrl*+*right* + Extend the current selection, but force it to be character wise, + rather than depending on the original selection mode. + *wheel* Scroll up/down in history +*ctrl*+*wheel* + Increase/decrease font size + ## TOUCHSCREEN *tap* diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index f184eb9a..2c50ca24 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -821,11 +821,11 @@ e.g. *search-start=none*. *font-increase* Increases the font size by 0.5pt. Default: _Control+plus - Control+equal Control+KP\_Add_. + Control+equal Control+KP\_Add_ (also defined in *mouse-bindings*). *font-decrease* Decreases the font size by 0.5pt. Default: _Control+minus - Control+KP\_Subtract_. + Control+KP\_Subtract_ (also defined in *mouse-bindings*). *font-reset* Resets the font size to the default. Default: _Control+0 Control+KP\_0_. @@ -1228,6 +1228,15 @@ actions listed under *key-bindings* can be used here as well. *primary-paste* Pastes from the _primary selection_. Default: _BTN\_MIDDLE_. +*font-increase* + Increases the font size by 0.5pt. Default: _Control+BTN\_BACK_ + (also defined in *key-bindings*). + +*font-decrease* + Decreases the font size by 0.5pt. Default: _Control+BTN\_FORWARD_ + (also defined in *key-bindings*). + + # TWEAK This section is for advanced users and describes configuration options