use key-queue for input

This commit is contained in:
Shin'ya Ueoka 2017-08-13 12:00:39 +09:00
parent e7342e9c23
commit 082450928a
7 changed files with 134 additions and 40 deletions

22
src/shared/actions.js Normal file
View file

@ -0,0 +1,22 @@
export const TABS_PREV = 'tabs.prev';
export const TABS_NEXT = 'tabs.next';
export const SCROLL_UP = 'scroll.up';
export const SCROLL_DOWN = 'scroll.down';
const BACKGROUND_ACTION_SET = new Set([
TABS_PREV,
TABS_NEXT
]);
const CONTENT_ACTION_SET = new Set([
SCROLL_UP,
SCROLL_DOWN
]);
export const isBackgroundAction = (action) => {
return BACKGROUND_ACTION_SET.has(action);
};
export const isContentAction = (action) => {
return CONTENT_ACTION_SET.has(action);
};