mirror of
https://github.com/nadrad/h-m-m.git
synced 2026-03-13 20:25:45 +01:00
Add Ctrl-k to delete to end of line and Ctrl-u to delete to start of line.
This commit is contained in:
parent
855d4b8eaf
commit
e0eafa0b14
2 changed files with 13 additions and 0 deletions
11
h-m-m
11
h-m-m
|
|
@ -1875,6 +1875,17 @@ function magic_readline(&$mm, $title)
|
|||
elseif ($in==special_keys['enter'])
|
||||
return trim($title);
|
||||
|
||||
elseif ($in==special_keys['ctrl_k'])
|
||||
{
|
||||
$title = mb_substr ($title, 0, $cursor-1);
|
||||
}
|
||||
|
||||
elseif ($in==special_keys['ctrl_u'])
|
||||
{
|
||||
$title = mb_substr ($title, $cursor-1);
|
||||
$cursor = 1;
|
||||
}
|
||||
|
||||
elseif ($in==special_keys['ctrl_v'])
|
||||
{
|
||||
$content =
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ In the text editor:
|
|||
* `Ctrl+Delete`or `Alt-d` - deletes word
|
||||
* `Backspace` - deletes previous character
|
||||
* `ctrl+Backspace`, `ctrl+w` - deletes previous word
|
||||
* `Ctrl-k` - deletes everything to the right of the cursor
|
||||
* `Ctrl-u` - deletes everything to the left of the cursor
|
||||
* `Ctrl+v` or `Ctrl+Shift+v` - paste
|
||||
* `Esc` - cancels editing
|
||||
* `Enter` - wanna guess? ;)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue