send press key to tabs
This commit is contained in:
parent
cf03d278eb
commit
3f8bbe11d9
11 changed files with 153 additions and 30 deletions
29
e2e/ambassador/src/client/keys.js
Normal file
29
e2e/ambassador/src/client/keys.js
Normal 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 };
|
Reference in a new issue