ui.tools.listener: document emacs-style keybindings for now.
parent
4f51adf8bf
commit
02386eebcc
|
@ -54,6 +54,11 @@ $nl
|
||||||
"If you want to add support for Emacs-style text entry, specifically the following:"
|
"If you want to add support for Emacs-style text entry, specifically the following:"
|
||||||
$nl
|
$nl
|
||||||
{ $table
|
{ $table
|
||||||
|
{ "Ctrl-b" "Move cursor to previous character" }
|
||||||
|
{ "Ctrl-f" "Move cursor to next character" }
|
||||||
|
{ "Ctrl-p" "Move cursor to previous line" }
|
||||||
|
{ "Ctrl-n" "Move cursor to next line" }
|
||||||
|
{ "Ctrl-u" "Delete to start of line" }
|
||||||
{ "Ctrl-k" "Delete to end of line" }
|
{ "Ctrl-k" "Delete to end of line" }
|
||||||
{ "Ctrl-a" "Move cursor to start of line" }
|
{ "Ctrl-a" "Move cursor to start of line" }
|
||||||
{ "Ctrl-e" "Move cursor to end of line" }
|
{ "Ctrl-e" "Move cursor to end of line" }
|
||||||
|
@ -65,13 +70,16 @@ $nl
|
||||||
"USING: accessors assocs kernel sequences sets ui.commands
|
"USING: accessors assocs kernel sequences sets ui.commands
|
||||||
ui.gadgets.editors ui.gestures ui.tools.listener ;
|
ui.gadgets.editors ui.gestures ui.tools.listener ;
|
||||||
|
|
||||||
\"multiline\" multiline-editor get-command-at [
|
editor \"emacs\" f {
|
||||||
{
|
{ T{ key-down f { C+ } \"b\" } previous-character }
|
||||||
{ T{ key-down f { C+ } \"k\" } delete-to-end-of-line }
|
{ T{ key-down f { C+ } \"f\" } next-character }
|
||||||
{ T{ key-down f { C+ } \"a\" } start-of-line }
|
{ T{ key-down f { C+ } \"p\" } previous-line }
|
||||||
{ T{ key-down f { C+ } \"e\" } end-of-line }
|
{ T{ key-down f { C+ } \"n\" } next-line }
|
||||||
} append members
|
{ T{ key-down f { C+ } \"u\" } delete-to-start-of-line }
|
||||||
] change-commands drop multiline-editor update-gestures
|
{ T{ key-down f { C+ } \"k\" } delete-to-end-of-line }
|
||||||
|
{ T{ key-down f { C+ } \"a\" } start-of-line }
|
||||||
|
{ T{ key-down f { C+ } \"e\" } end-of-line }
|
||||||
|
} define-command-map
|
||||||
|
|
||||||
\"interactor\" interactor get-command-at [
|
\"interactor\" interactor get-command-at [
|
||||||
[ drop T{ key-down f { C+ } \"k\" } = ] assoc-reject
|
[ drop T{ key-down f { C+ } \"k\" } = ] assoc-reject
|
||||||
|
|
Loading…
Reference in New Issue