patch 9.1.0597: KeyInputPre cannot get the (unmapped typed) key
Problem: KeyInputPre cannot get the (unmapped typed) key
(after v9.1.0563)
Solution: Add the "typedchar" property to the v:event dict
(Shougo Matsushita)
closes: #15231
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 1e9c896..0461c04 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 9.1. Last change: 2024 Jul 11
+*autocmd.txt* For Vim version 9.1. Last change: 2024 Jul 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -980,10 +980,11 @@
InsertLeave Just after leaving Insert mode. Also when
using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
*KeyInputPre*
-KeyInputPre Just before a key is processed. The pattern is
- matched against a string that indicates the
- current mode, which is the same as what is
- returned by `mode(1)`.
+KeyInputPre Just before a key is processed after mappings
+ have been applied. The pattern is matched
+ against a string that indicates the current
+ mode, which is the same as what is returned by
+ `mode(1)`.
The |v:char| variable indicates the key typed
and can be changed during the event to process
a different key. When |v:char| is not a
@@ -991,6 +992,7 @@
character is used.
The following values of |v:event| are set:
typed The key is typed or not.
+ typedchar The (actual) typed key.
It is not allowed to change the text
|textlock| or the current mode.
{only with the +eval feature}