1
0
forked from aniani/vim

patch 9.1.0563: Cannot process any Key event

Problem:  Cannot process any Key event
Solution: Add the KeyInputPre autocmd
          (Shougo Matsushita)

closes: #15182

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Shougo Matsushita
2024-07-11 22:05:12 +02:00
committed by Christian Brabandt
parent e7b98ab96e
commit 8367884909
10 changed files with 182 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.1. Last change: 2024 Jul 09
*autocmd.txt* For Vim version 9.1. Last change: 2024 Jul 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -439,6 +439,8 @@ Name triggered by ~
|CompleteDone| after Insert mode completion is done, after clearing
info
|KeyInputPre| just before a key is processed
|User| to be used in combination with ":doautocmd"
|SigUSR1| after the SIGUSR1 signal has been detected
@@ -977,6 +979,21 @@ InsertLeavePre Just before leaving Insert mode. Also when
*InsertLeave*
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)`.
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
single character or a special key, the first
character is used.
The following values of |v:event| are set:
typed The key is typed or not.
It is not allowed to change the text
|textlock| or the current mode.
{only with the +eval feature}
*MenuPopup*
MenuPopup Just before showing the popup menu (under the
right mouse button). Useful for adjusting the

View File

@@ -1995,7 +1995,8 @@ v:beval_winid The |window-ID| of the window, over which the mouse pointer
*v:char* *char-variable*
v:char Argument for evaluating 'formatexpr' and used for the typed
character when using <expr> in an abbreviation |:map-<expr>|.
It is also used by the |InsertCharPre| and |InsertEnter| events.
It is also used by the |InsertCharPre|, |InsertEnter| and
|KeyInputPre| events.
*v:charconvert_from* *charconvert_from-variable*
v:charconvert_from

View File

@@ -5554,6 +5554,7 @@ Jobs eval.txt /*Jobs*
K various.txt /*K*
KDE gui_x11.txt /*KDE*
KVim gui_x11.txt /*KVim*
KeyInputPre autocmd.txt /*KeyInputPre*
Kibaale uganda.txt /*Kibaale*
Korean mbyte.txt /*Korean*
L motion.txt /*L*

View File

@@ -41607,6 +41607,7 @@ Functions: ~
Autocommands: ~
|CursorMovedC| after the cursor was moved in the comamnd-line
|KeyInputPre| process any Key event in any mode
|SessionWritePost| after writing the session file |:mksession|
|TermResponseAll| after the terminal response to |t_RV| and others is
received