send press key to tabs

This commit is contained in:
Shin'ya Ueoka 2018-02-11 15:40:34 +09:00
parent cf03d278eb
commit 3f8bbe11d9
11 changed files with 153 additions and 30 deletions

View file

@ -0,0 +1,29 @@
import { EVENT_KEYPRESS, EVENT_KEYDOWN, EVENT_KEYUP } from '../shared/messages';
import * as ipc from './ipc';
const press = (tabId, key) => {
return ipc.send({
type: EVENT_KEYPRESS,
tabId,
key,
});
};
const down = (tabId, key) => {
return ipc.send({
type: EVENT_KEYDOWN,
tabId,
key,
});
};
const up = (tabId, key) => {
return ipc.send({
type: EVENT_KEYUP,
tabId,
key,
});
};
export { press, down, up };