aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index e02ed20644..d967e2b313 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1640,12 +1640,14 @@ vim.on_key({fn}, {ns_id}) *vim.on_key()*
Note: ~
• {fn} will be removed on error.
• {fn} will not be cleared by |nvim_buf_clear_namespace()|
- • {fn} will receive the keys after mappings have been evaluated
Parameters: ~
- • {fn} (`fun(key: string)?`) Function invoked on every key press.
- |i_CTRL-V| Passing in nil when {ns_id} is specified removes
- the callback associated with namespace {ns_id}.
+ • {fn} (`fun(key: string, typed: string)?`) Function invoked on
+ every key press. |i_CTRL-V| {key} is the key after mappings
+ have been applied, and {typed} is the key(s) before mappings
+ are applied, which may be empty if {key} is produced by
+ non-typed keys. When {fn} is nil and {ns_id} is specified,
+ the callback associated with namespace {ns_id} is removed.
• {ns_id} (`integer?`) Namespace ID. If nil or 0, generates and returns
a new |nvim_create_namespace()| id.