mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
config/input: add scrollback-home|end key bindings (unbound by default)
This commit is contained in:
parent
cb43c58150
commit
f869ca4546
5 changed files with 26 additions and 0 deletions
|
|
@ -43,6 +43,8 @@
|
|||
|
||||
* OSC-22 - set xcursor pointer.
|
||||
* Add "xterm" as fallback cursor where "text" is not available.
|
||||
* `[key-bindings].scrollback-home|end` options.
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
|||
2
config.c
2
config.c
|
|
@ -95,6 +95,8 @@ static const char *const binding_action_map[] = {
|
|||
[BIND_ACTION_SCROLLBACK_DOWN_PAGE] = "scrollback-down-page",
|
||||
[BIND_ACTION_SCROLLBACK_DOWN_HALF_PAGE] = "scrollback-down-half-page",
|
||||
[BIND_ACTION_SCROLLBACK_DOWN_LINE] = "scrollback-down-line",
|
||||
[BIND_ACTION_SCROLLBACK_HOME] = "scrollback-home",
|
||||
[BIND_ACTION_SCROLLBACK_END] = "scrollback-end",
|
||||
[BIND_ACTION_CLIPBOARD_COPY] = "clipboard-copy",
|
||||
[BIND_ACTION_CLIPBOARD_PASTE] = "clipboard-paste",
|
||||
[BIND_ACTION_PRIMARY_PASTE] = "primary-paste",
|
||||
|
|
|
|||
|
|
@ -681,6 +681,12 @@ e.g. *search-start=none*.
|
|||
*scrollback-down-line*
|
||||
Scroll down/forward a single line in history. Default: _not bound_.
|
||||
|
||||
*scrollback-home*
|
||||
Scroll to the beginning of the scrollback. Default: _not bound_.
|
||||
|
||||
*scrollback-end*
|
||||
Scroll to the end (bottom) of the scrollback. Default: _not bound_.
|
||||
|
||||
*clipboard-copy*
|
||||
Copies the current selection into the _clipboard_. Default: _Control+Shift+c_
|
||||
_XF86Copy_.
|
||||
|
|
|
|||
14
input.c
14
input.c
|
|
@ -134,6 +134,20 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
}
|
||||
break;
|
||||
|
||||
case BIND_ACTION_SCROLLBACK_HOME:
|
||||
if (term->grid == &term->normal) {
|
||||
cmd_scrollback_up(term, term->grid->num_rows);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case BIND_ACTION_SCROLLBACK_END:
|
||||
if (term->grid == &term->normal) {
|
||||
cmd_scrollback_down(term, term->grid->num_rows);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case BIND_ACTION_CLIPBOARD_COPY:
|
||||
selection_to_clipboard(seat, term, serial);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ enum bind_action_normal {
|
|||
BIND_ACTION_SCROLLBACK_DOWN_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_DOWN_HALF_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_DOWN_LINE,
|
||||
BIND_ACTION_SCROLLBACK_HOME,
|
||||
BIND_ACTION_SCROLLBACK_END,
|
||||
BIND_ACTION_CLIPBOARD_COPY,
|
||||
BIND_ACTION_CLIPBOARD_PASTE,
|
||||
BIND_ACTION_PRIMARY_PASTE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue