Keyboard/mouse mode and keyboard support bugfixes

This commit is contained in:
Scott Nonnenberg
2019-11-21 11:16:06 -08:00
committed by Ken Powers
parent ed55006f20
commit 2a0a73cfc1
25 changed files with 686 additions and 274 deletions

View File

@@ -1,4 +1,3 @@
import { AnyAction } from 'redux';
import { LocalizerType } from '../../types/Util';
// State
@@ -11,6 +10,7 @@ export type UserStateType = {
platform: string;
regionCode: string;
i18n: LocalizerType;
interactionMode: 'mouse' | 'keyboard';
};
// Actions
@@ -18,12 +18,13 @@ export type UserStateType = {
type UserChangedActionType = {
type: 'USER_CHANGED';
payload: {
ourNumber: string;
regionCode: string;
ourNumber?: string;
regionCode?: string;
interactionMode?: 'mouse' | 'keyboard';
};
};
export type UserActionType = AnyAction | UserChangedActionType;
export type UserActionType = UserChangedActionType;
// Action Creators
@@ -51,6 +52,7 @@ function getEmptyState(): UserStateType {
ourNumber: 'missing',
regionCode: 'missing',
platform: 'missing',
interactionMode: 'mouse',
i18n: () => 'missing',
};
}