shikato / keysender.vim

Keysender is Vim plugin to send an application key events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keysender.vim

Keysender is Vim plugin to send an application key events.

demo1

demo2

You can use this software only in Mac.
Because this software uses JXA.

Download

ex. NeoBundle

.vimrc

NeoBundle 'shikato/keysender.vim'

Usage

Command Action
:KeysenderKeystroke ...something The command sends an application keystroke.
:KeysenderKeyCode ...something The command sends an application key code.
:KeysenderSetTargetAppName something The command sets target application name. (Default: Chrome)
:KeysenderSetVimAppName something The command sets Vim application name. (Default: MacVim)

Example

Basic

If you want to send Chrome [a]

:KeysenderKeystroke a

Plural & Change target application

If you want to send Safari [abc], [d], [ef]

:KeysenderSetTargetAppName Safari
:KeysenderKeystroke abc d ef

Attribute Key

If you want to send Chrome [a + ctrl], [bc + command + option], [e + shift]

:KeysenderKeystroke a,c bc,d,a e,s
Key Description
c ctrl
d command
a option
s shift

Key code

Keysender can send key code of Mac.

:KeysenderTypeKeyCode 2,c,a

You can know the key code by this command.

grep 'kVK_.*=' /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h

Other documents

Qiita

License

MIT

About

Keysender is Vim plugin to send an application key events.

License:MIT License


Languages

Language:JavaScript 69.7%Language:Vim Script 30.3%