Skip to content

Latest commit

 

History

History
68 lines (57 loc) · 1.73 KB

README.md

File metadata and controls

68 lines (57 loc) · 1.73 KB

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

.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