From 5fe9b447a45a7a0396b584107a422b424e9737c5 Mon Sep 17 00:00:00 2001 From: Canop Date: Fri, 29 Oct 2021 17:31:19 +0200 Subject: bunch of small improvements of clipboard & input field --- website/docs/conf_verbs.md | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) (limited to 'website') diff --git a/website/docs/conf_verbs.md b/website/docs/conf_verbs.md index bfe1563..95bc9b1 100644 --- a/website/docs/conf_verbs.md +++ b/website/docs/conf_verbs.md @@ -381,16 +381,19 @@ Some internal actions can be bound to a key shortcut but can't be called explici name | default binding | behavior -|-|- :input_clear | | empty the input, -:input_del_char_left | delete | delete the char left of the cursor, -:input_del_char_below | suppr | delete the char left at the cursor's position, -:input_del_word_left | - | delete the word left of the cursor, -:input_del_word_right | - | delete the word right of the cursor, -:input_go_to_end | end | move the cursor to the end of input, -:input_go_left | | move the cursor to the left, -:input_go_right | | move the cursor to the right, -:input_go_to_start | home | move the cursor to the start of input, -:input_go_word_left | - | move the cursor one word to the left, -:input_go_word_right | - | move the cursor one word to the right, +:input_del_char_left | delete | delete the char left of the cursor +:input_del_char_below | suppr | delete the char left at the cursor's position +:input_del_word_left | - | delete the word left of the cursor +:input_del_word_right | - | delete the word right of the cursor +:input_go_to_end | end | move the cursor to the end of input +:input_go_left | | move the cursor to the left +:input_go_right | | move the cursor to the right +:input_go_to_start | home | move the cursor to the start of input +:input_go_word_left | - | move the cursor one word to the left +:input_go_word_right | - | move the cursor one word to the right +:input_selection_copy | - | copy the selected part of the input into the selection +:input_selection_cut | - | cut the selected part of the input into the selection +:input_paste | - | paste the clipboard content into the input You may add this kind of shortcuts in the `verbs` section: @@ -418,6 +421,22 @@ key = "alt-r" internal = ":input_del_word_right" ``` +## Copy, Cut, Paste, in input + +By default, only pasting into input is bound (with ctrlV), because you don't usually write long texts here, but you may bind copying and cutting too: + +```hjson +{ key: "ctrl-c", internal: ":input_selection_copy" } +{ key: "ctrl-x", internal: ":input_selection_cut" } +``` +```toml +[[verbs]] +key = "ctrl-c" +internal = ":input_selection_copy" +[[verbs]] +key = "ctrl-x" +internal = ":input_selection_cut" +``` # Focus -- cgit v1.2.3