mirror of
https://github.com/coder/code-server.git
synced 2026-05-28 07:59:34 +00:00
17 lines
786 B
TypeScript
17 lines
786 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
|
|
|
export const enum DispatchConfig {
|
|
Code,
|
|
KeyCode
|
|
}
|
|
|
|
export function getDispatchConfig(configurationService: IConfigurationService): DispatchConfig {
|
|
const keyboard = configurationService.getValue('keyboard');
|
|
const r = (keyboard ? (<any>keyboard).dispatch : null);
|
|
return (r === 'keyCode' ? DispatchConfig.KeyCode : DispatchConfig.Code);
|
|
} |