diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-06-29 21:20:28 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-06-29 21:28:49 +1000 |
| commit | 6ab6d5884b715560f789a114cdb8e0d98d2e0940 (patch) | |
| tree | 9d6ce18cd33ccec2ae32521b9dc50533700cf1e9 /src/lib.ts | |
| parent | e4c2de4f953e34f5f5e27f6574943770090b4ce0 (diff) | |
Add setting for disabling keyboard shortcuts
Avoid showing the setting on touch devices
Diffstat (limited to 'src/lib.ts')
| -rw-r--r-- | src/lib.ts | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,7 +4,7 @@ import {TolNode} from './tol'; import {LayoutOptions} from './layout'; -import {getBreakpoint, getScrollBarWidth, isTouchDevice} from './util'; +import {getBreakpoint, getScrollBarWidth, onTouchDevice} from './util'; // For server requests const SERVER_URL = 'http://localhost:8000/cgi-bin/data.py' @@ -109,6 +109,7 @@ export type UiOptions = { tutorialSkip: boolean, disabledActions: Set<Action>, useDblClick: boolean, + disableShortcuts: boolean, }; // Option defaults export function getDefaultLytOpts(): LayoutOptions { @@ -168,7 +169,8 @@ export function getDefaultUiOpts(lytOpts: LayoutOptions): UiOptions { searchJumpMode: false, tutorialSkip: false, disabledActions: new Set() as Set<Action>, - useDblClick: isTouchDevice(), + useDblClick: onTouchDevice(), + disableShortcuts: false, }; } // Used in Settings.vue, and when saving to localStorage |
