config: map Control+wheel to font increase/decrease

This is in addition to the already existing keyboard shortcuts.

Also add missing default keyboard/mouse bindings to readme + foot(1).
This commit is contained in:
Daniel Eklöf 2024-02-15 16:41:16 +01:00
parent 729bd57cae
commit 9ca84e6b48
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 44 additions and 8 deletions

View file

@ -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

View file

@ -151,10 +151,10 @@ These are the default shortcuts. See `man foot.ini` and the example
: Start a scrollback search
<kbd>ctrl</kbd>+<kbd>+</kbd>, <kbd>ctrl</kbd>+<kbd>=</kbd>
: Increase font size by 0,5pt
: Increase font size
<kbd>ctrl</kbd>+<kbd>-</kbd>
: Decrease font size by 0,5pt
: Decrease font size
<kbd>ctrl</kbd>+<kbd>0</kbd>
: 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.
<kbd>left</kbd> - **triple-click**
: Selects the entire row
: Selects the everything between enclosing quotes, or the entire row
if not inside a quote.
<kbd>left</kbd> - **quad-click**
: Selects the entire row.
<kbd>middle</kbd>
: 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.
<kbd>ctrl</kbd>+<kbd>right</kbd>
: Extend the current selection, but force it to be character wise,
rather than depending on the original selection mode.
<kbd>wheel</kbd>
: Scroll up/down in history
<kbd>ctrl</kbd>+<kbd>wheel</kbd>
: Increase/decrease font size
### Touchscreen

View file

@ -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);

View file

@ -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*

View file

@ -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