import { Event } from '@vscode-alt/monaco-editor/esm/vs/base/common/event'; import { Disposable, IDisposable } from '@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle'; import { IKeyboardEvent } from '@vscode-alt/monaco-editor/esm/vs/platform/keybinding/common/keybinding'; import { IKeyboardMapper, IKeymapService, IKeyboardLayoutInfo, IKeyboardMapping, DispatchConfig, IClientConfigurationService, INotificationService, ICommandService, IStorageService, IEnvironmentService, ILifecycleService } from '@workbench-stack/core'; import { IClientFileService as IFileService } from '@files-stack/core'; import { KeymapInfo } from './keyboardMapper'; export interface IKeyboard { getLayoutMap(): Promise; lock(keyCodes?: string[]): Promise; unlock(): void; addEventListener?(type: string, listener: () => void): void; } export declare type INavigatorWithKeyboard = Navigator & { keyboard: IKeyboard; }; export declare type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; export declare function getNodeType(value: any): NodeType; export declare class BrowserKeyboardMapperFactoryBase { protected _initialized: boolean; protected _keyboardMapper: IKeyboardMapper | null; private readonly _onDidChangeKeyboardMapper; readonly onDidChangeKeyboardMapper: Event; protected _keymapInfos: KeymapInfo[]; protected _mru: KeymapInfo[]; private _activeKeymapInfo; get activeKeymap(): KeymapInfo | null; get keymapInfos(): KeymapInfo[]; get activeKeyboardLayout(): IKeyboardLayoutInfo | null; get activeKeyMapping(): IKeyboardMapping | null; get keyboardLayouts(): IKeyboardLayoutInfo[]; protected constructor(); registerKeyboardLayout(layout: KeymapInfo): void; removeKeyboardLayout(layout: KeymapInfo): void; getMatchedKeymapInfo(keyMapping: IKeyboardMapping | null): { result: KeymapInfo; score: number; } | null; getUSStandardLayout(): KeymapInfo; isKeyMappingActive(keymap: IKeyboardMapping | null): boolean; setUSKeyboardLayout(): void; setActiveKeyMapping(keymap: IKeyboardMapping | null): void; setActiveKeymapInfo(keymapInfo: KeymapInfo): void; onKeyboardLayoutChanged(): void; private _updateKeyboardLayoutAsync; getKeyboardMapper(dispatchConfig: DispatchConfig): IKeyboardMapper; validateCurrentKeyboardMapping(keyboardEvent: IKeyboardEvent): void; setKeyboardLayout(layoutName: string): void; private _setKeyboardData; private static _createKeyboardMapper; private _validateCurrentKeyboardMapping; private _getBrowserKeyMapping; } export declare class MutableDisposable implements IDisposable { private _value?; private _isDisposed; constructor(); get value(): T | undefined; set value(value: T | undefined); clear(): void; dispose(): void; } export declare class BrowserKeyboardMapperFactory extends BrowserKeyboardMapperFactoryBase { constructor(notificationService: INotificationService, storageService: IStorageService, commandService: ICommandService); } export declare class BrowserKeymapService extends Disposable implements IKeymapService { environmentService: IEnvironmentService; fileService: IFileService; private lifecycleService; notificationService: INotificationService; storageService: IStorageService; commandService: ICommandService; private configurationService; _serviceBrand: undefined; private readonly _onDidChangeKeyboardMapper; readonly onDidChangeKeyboardMapper: Event; private _userKeyboardLayout; private readonly layoutChangeListener; private _factory; constructor(environmentService: IEnvironmentService, fileService: IFileService, lifecycleService: ILifecycleService, notificationService: INotificationService, storageService: IStorageService, commandService: ICommandService, configurationService: IClientConfigurationService); private postSetup; setUserKeyboardLayoutIfMatched(): void; registerKeyboardListener(): void; getKeyboardMapper(dispatchConfig: DispatchConfig): IKeyboardMapper; getCurrentKeyboardLayout(): IKeyboardLayoutInfo | null; getAllKeyboardLayouts(): IKeyboardLayoutInfo[]; getRawKeyboardMapping(): IKeyboardMapping | null; validateCurrentKeyboardMapping(keyboardEvent: IKeyboardEvent): void; }