feat: port several widespread GUI keys to the input component (#2849)

Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
Axlefublr 2025-06-09 08:22:13 +08:00 committed by GitHub
parent b637c32ef7
commit c0615e5f45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -262,6 +262,8 @@ keymap = [
{ on = "E", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" }, { on = "E", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" },
{ on = "<A-b>", run = "backward", desc = "Move back to the start of the current or previous word" }, { on = "<A-b>", run = "backward", desc = "Move back to the start of the current or previous word" },
{ on = "<A-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, { on = "<A-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
{ on = "<C-Left>", run = "backward", desc = "Move back to the start of the current or previous word" },
{ on = "<C-Right>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
# Line-wise movement # Line-wise movement
{ on = "0", run = "move bol", desc = "Move to the BOL" }, { on = "0", run = "move bol", desc = "Move to the BOL" },
@ -284,6 +286,8 @@ keymap = [
{ on = "<C-k>", run = "kill eol", desc = "Kill forwards to the EOL" }, { on = "<C-k>", run = "kill eol", desc = "Kill forwards to the EOL" },
{ on = "<C-w>", run = "kill backward", desc = "Kill backwards to the start of the current word" }, { on = "<C-w>", run = "kill backward", desc = "Kill backwards to the start of the current word" },
{ on = "<A-d>", run = "kill forward", desc = "Kill forwards to the end of the current word" }, { on = "<A-d>", run = "kill forward", desc = "Kill forwards to the end of the current word" },
{ on = "<C-Backspace>", run = "kill backward", desc = "Kill backwards to the start of the current word" },
{ on = "<C-Delete>", run = "kill forward", desc = "Kill forwards to the end of the current word" },
# Cut/Yank/Paste # Cut/Yank/Paste
{ on = "d", run = "delete --cut", desc = "Cut selected characters" }, { on = "d", run = "delete --cut", desc = "Cut selected characters" },