1 | import { NativeKeyboardLayout, KeyboardLayoutProvider, KeyboardLayoutChangeNotifier, KeyValidator } from '../../common/keyboard/keyboard-layout-provider';
|
2 | import { Emitter, Event } from '../../common/event';
|
3 | import { KeyCode, Key } from './keys';
|
4 | export interface KeyboardLayout {
|
5 | |
6 |
|
7 |
|
8 |
|
9 | readonly key2KeyCode: KeyCode[];
|
10 | |
11 |
|
12 |
|
13 |
|
14 | readonly code2Character: {
|
15 | [code: string]: string;
|
16 | };
|
17 | }
|
18 | export declare class KeyboardLayoutService {
|
19 | protected readonly layoutProvider: KeyboardLayoutProvider;
|
20 | protected readonly layoutChangeNotifier: KeyboardLayoutChangeNotifier;
|
21 | protected readonly keyValidator?: KeyValidator;
|
22 | private currentLayout?;
|
23 | protected updateLayout(newLayout: NativeKeyboardLayout): KeyboardLayout;
|
24 | protected keyboardLayoutChanged: Emitter<KeyboardLayout>;
|
25 | get onKeyboardLayoutChanged(): Event<KeyboardLayout>;
|
26 | initialize(): Promise<void>;
|
27 | |
28 |
|
29 |
|
30 |
|
31 |
|
32 | resolveKeyCode(inCode: KeyCode): KeyCode;
|
33 | |
34 |
|
35 |
|
36 |
|
37 | getKeyboardCharacter(key: Key): string;
|
38 | |
39 |
|
40 |
|
41 |
|
42 | validateKeyCode(keyCode: KeyCode): void;
|
43 | protected transformKeyCode(inCode: KeyCode, mappedCode: KeyCode, keyNeedsShift: boolean): KeyCode | undefined;
|
44 | protected transformNativeLayout(nativeLayout: NativeKeyboardLayout): KeyboardLayout;
|
45 | protected shouldIncludeKey(code: string): boolean;
|
46 | private addKeyMapping;
|
47 | private addWindowsKeyMapping;
|
48 | protected getCharacterIndex(key: Key, shift?: boolean): number;
|
49 | }
|
50 |
|
\ | No newline at end of file |