mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
config: add [key-bindings].noop action
Key combinations assigned to this action will not be sent to the application. Closes #765
This commit is contained in:
parent
b2ddacb799
commit
bcea929c94
6 changed files with 18 additions and 5 deletions
|
|
@ -38,8 +38,11 @@
|
|||
* `notify-focus-inhibit` boolean option, which can be used to control
|
||||
whether desktop notifications should be inhibited when the terminal
|
||||
has keyboard focus
|
||||
* `colors.scrollback-indicator` color-pair option, which specifies
|
||||
* `[colors].scrollback-indicator` color-pair option, which specifies
|
||||
foreground and background colors for the scrollback indicator.
|
||||
* `[key-bindings].noop` action. Key combinations assigned to this
|
||||
action will not be sent to the application
|
||||
(https://codeberg.org/dnkl/foot/issues/765).
|
||||
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
1
config.c
1
config.c
|
|
@ -84,6 +84,7 @@ static const uint32_t default_color_table[256] = {
|
|||
|
||||
static const char *const binding_action_map[] = {
|
||||
[BIND_ACTION_NONE] = NULL,
|
||||
[BIND_ACTION_NOOP] = "noop",
|
||||
[BIND_ACTION_SCROLLBACK_UP_PAGE] = "scrollback-up-page",
|
||||
[BIND_ACTION_SCROLLBACK_UP_HALF_PAGE] = "scrollback-up-half-page",
|
||||
[BIND_ACTION_SCROLLBACK_UP_LINE] = "scrollback-up-line",
|
||||
|
|
|
|||
|
|
@ -606,24 +606,28 @@ default shortcut for *search-start*, you first need to unmap the
|
|||
default binding. This can be done by setting _action=none_;
|
||||
e.g. *search-start=none*.
|
||||
|
||||
*noop*
|
||||
All key combinations listed here will not be sent to the
|
||||
application. Default: _not bound_.
|
||||
|
||||
*scrollback-up-page*
|
||||
Scrolls up/back one page in history. Default: _Shift+Page\_Up_.
|
||||
|
||||
*scrollback-up-half-page*
|
||||
Scrolls up/back half of a page in history. Default: _not set_.
|
||||
Scrolls up/back half of a page in history. Default: _not bound_.
|
||||
|
||||
*scrollback-up-line*
|
||||
Scrolls up/back a single line in history. Default: _not set_.
|
||||
Scrolls up/back a single line in history. Default: _not bound_.
|
||||
|
||||
*scrollback-down-page*
|
||||
Scroll down/forward one page in history. Default:
|
||||
_Shift+Page\_Down_.
|
||||
|
||||
*scrollback-down-half-page*
|
||||
Scroll down/forward half of a page in history. Default: _not set_.
|
||||
Scroll down/forward half of a page in history. Default: _not bound_.
|
||||
|
||||
*scrollback-down-line*
|
||||
Scroll down/forward a single line in history. Default: _not set_.
|
||||
Scroll down/forward a single line in history. Default: _not bound_.
|
||||
|
||||
*clipboard-copy*
|
||||
Copies the current selection into the _clipboard_. Default: _Control+Shift+c_.
|
||||
|
|
|
|||
1
foot.ini
1
foot.ini
|
|
@ -127,6 +127,7 @@
|
|||
# pipe-selected=[xargs -r firefox] none
|
||||
# show-urls-launch=Control+Shift+u
|
||||
# show-urls-copy=none
|
||||
# noop=none
|
||||
|
||||
[search-bindings]
|
||||
# cancel=Control+g Control+c Escape
|
||||
|
|
|
|||
3
input.c
3
input.c
|
|
@ -87,6 +87,9 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
case BIND_ACTION_NONE:
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_NOOP:
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_SCROLLBACK_UP_PAGE:
|
||||
if (term->grid == &term->normal) {
|
||||
cmd_scrollback_up(term, term->rows);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ struct terminal;
|
|||
|
||||
enum bind_action_normal {
|
||||
BIND_ACTION_NONE,
|
||||
BIND_ACTION_NOOP,
|
||||
BIND_ACTION_SCROLLBACK_UP_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_UP_HALF_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_UP_LINE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue