Skip to main content
Module

x/denops_std/function/nvim/mod.ts>nvim_input_mouse

📚 Standard module for denops.vim
Go to Latest
function nvim_input_mouse
import { nvim_input_mouse } from "https://deno.land/x/denops_std@v6.4.0/function/nvim/mod.ts";

Send mouse event from GUI.

Non-blocking: does not wait on any result, but queues the event to be processed soon by the event loop.

Note: Currently this doesn't support "scripting" multiple mouse events by calling it multiple times in a loop: the intermediate mouse positions will be ignored. It should be used to implement real-time mouse input in a GUI. The deprecated pseudokey form ("<LeftMouse><col,row>") of nvim_input() has the same limitation.

Attributes: api-fast

Parameters:

  • {button} Mouse button: one of "left", "right", "middle", "wheel", "move".
  • {action} For ordinary buttons, one of "press", "drag", "release". For the wheel, one of "up", "down", "left", "right". Ignored for "move".
  • {modifier} String of modifiers each represented by a single char. The same specifiers are used as for a key press, except that the "-" separator is optional, so "C-A-", "c-a" and "CA" can all be used to specify Ctrl+Alt+click.
  • {grid} Grid number if the client uses ui-multigrid, else 0.
  • {row} Mouse row-position (zero-based, like redraw events)
  • {col} Mouse column-position (zero-based, like redraw events)

Parameters

denops: Denops
button: unknown
action: unknown
modifier: unknown
grid: unknown
row: unknown
col: unknown

Returns

Promise<unknown>