Keysender is Vim plugin to send an application key events.
You can use this software only in Mac.
Because this software uses JXA.
ex. NeoBundle
.vimrc
NeoBundle 'shikato/keysender.vim'
| 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) |
If you want to send Chrome [a]
:KeysenderKeystroke a
If you want to send Safari [abc], [d], [ef]
:KeysenderSetTargetAppName Safari
:KeysenderKeystroke abc d ef
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 |
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
MIT