Send keyboard's keys combination to Windows OS system from within Vim

17 views
Skip to first unread message

Ni Va

unread,
Dec 5, 2019, 8:08:44 AM12/5/19
to vim_use
Hi,

Is it possible to send keyboard's keys combination to Windows OS system from within Vim ?

Thank you
NiVa

Tim Chase

unread,
Dec 5, 2019, 8:34:12 AM12/5/19
to Ni Va, vim...@googlegroups.com
On 2019-12-05 05:08, Ni Va wrote:
> Is it possible to send keyboard's keys combination to Windows OS
> system from within Vim ?

Over in the BSD & Linux world I have "xdotool" which will generate
typing as well as mouse motions/clicks, potentially sending them to a
given target window. So I occasionally do things like

$ sleep $(( 60 * 10 )) ; xdotool click 1

to sleep for 10 minutes and then click the mouse button. Thus you
can invoke it from within vim as something like

:!sleep 3; xdotool type "This is text to type"

So it's not impossible conceptually. However, I don't know of
anything like xdotool over in the Windows world, so you'd have to
track down something that offers similar functionality.

-tim



Ni Va

unread,
Dec 5, 2019, 8:40:13 AM12/5/19
to vim_use
Woule like to send <WindowsKey>+Left Arrow from within Vim.

Maybe gvimext give vim's user capacity to interact with system calling the good dll on windows (like rundll32) ?
Reply all
Reply to author
Forward
0 new messages