mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
docs: Describe how to escape keycodes with nvim_feedkeys (#12484)
Closes #12297
This commit is contained in:
@@ -729,6 +729,15 @@ nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
|
|||||||
|
|
||||||
On execution error: does not fail, but updates v:errmsg.
|
On execution error: does not fail, but updates v:errmsg.
|
||||||
|
|
||||||
|
If you need to input sequences like <C-o> use nvim_replace_termcodes
|
||||||
|
to replace the termcodes and then pass the resulting string to
|
||||||
|
nvim_feedkeys. You'll also want to enable escape_csi.
|
||||||
|
|
||||||
|
Example: >
|
||||||
|
:let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true)
|
||||||
|
:call nvim_feedkeys(key, 'n', v:true)
|
||||||
|
<
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{keys} to be typed
|
{keys} to be typed
|
||||||
{mode} behavior flags, see |feedkeys()|
|
{mode} behavior flags, see |feedkeys()|
|
||||||
|
@@ -203,6 +203,16 @@ Integer nvim_get_hl_id_by_name(String name)
|
|||||||
/// flags. This is a blocking call, unlike |nvim_input()|.
|
/// flags. This is a blocking call, unlike |nvim_input()|.
|
||||||
///
|
///
|
||||||
/// On execution error: does not fail, but updates v:errmsg.
|
/// On execution error: does not fail, but updates v:errmsg.
|
||||||
|
//
|
||||||
|
// If you need to input sequences like <C-o> use nvim_replace_termcodes
|
||||||
|
// to replace the termcodes and then pass the resulting string to
|
||||||
|
// nvim_feedkeys. You'll also want to enable escape_csi.
|
||||||
|
///
|
||||||
|
/// Example:
|
||||||
|
/// <pre>
|
||||||
|
/// :let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true)
|
||||||
|
/// :call nvim_feedkeys(key, 'n', v:true)
|
||||||
|
/// </pre>
|
||||||
///
|
///
|
||||||
/// @param keys to be typed
|
/// @param keys to be typed
|
||||||
/// @param mode behavior flags, see |feedkeys()|
|
/// @param mode behavior flags, see |feedkeys()|
|
||||||
|
Reference in New Issue
Block a user