mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
wip: map key combos to custom text strings (including escapes)
With this, it is now possible to map key combos to custom escapes. The new bindings are defined in a new section, “text-bindings”, on the form “string=key combo”. The string can consist of printable characters, or \xNN style hex digits: [text-bindings] abcd = Control+a \x1b[A = Control+b Control+c Control+d # map ctrl+b/c/d to UP
This commit is contained in:
parent
8fa16f616c
commit
422d94fb46
5 changed files with 132 additions and 4 deletions
5
input.c
5
input.c
|
|
@ -313,6 +313,11 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
return true;
|
||||
}
|
||||
|
||||
case BIND_ACTION_TEXT_BINDING:
|
||||
xassert(binding->aux->type == BINDING_AUX_TEXT);
|
||||
term_to_slave(term, binding->aux->text.data, binding->aux->text.len);
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_SELECT_BEGIN:
|
||||
selection_start(
|
||||
term, seat->mouse.col, seat->mouse.row, SELECTION_CHAR_WISE, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue