1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
ash / webui / common / resources / keyboard_diagram.d.ts [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {KeyboardKeyState} from './keyboard_key.js';
export enum MechanicalLayout {
ANSI = 'ansi',
ISO = 'iso',
JIS = 'jis',
}
export enum PhysicalLayout {
CHROME_OS = 'chrome-os',
CHROME_OS_DELL_ENTERPRISE_WILCO = 'dell-enterprise-wilco',
CHROME_OS_DELL_ENTERPRISE_DRALLION = 'dell-enterprise-drallion',
}
export enum TopRightKey {
POWER = 'power',
LOCK = 'lock',
CONTROL_PANEL = 'control-panel',
}
interface TopRowKeyInterface {
[index: string]: {icon?: string, ariaNameI18n?: string, text?: string};
}
export class KeyboardDiagramElement extends HTMLElement {
topRightKey: TopRightKey;
showNumberPad: boolean;
setKeyState(evdevCode: number, state: KeyboardKeyState): void;
setTopRowKeyState(topRowPosition: number, state: KeyboardKeyState): void;
clearPressedKeys(): void;
resetAllKeys(): void;
}
export const TopRowKey: TopRowKeyInterface;
declare global {
interface HTMLElementTagNameMap {
'keyboard-diagram': KeyboardDiagramElement;
}
}