|
| 1 | +/*--------------------------------------------------------------------------------------------- |
| 2 | + * Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | + * Licensed under the MIT License. See License.txt in the project root for license information. |
| 4 | + *--------------------------------------------------------------------------------------------*/ |
| 5 | + |
| 6 | +export interface IWindowsKeyMapping { |
| 7 | + vkey: string; |
| 8 | + value: string; |
| 9 | + withShift: string; |
| 10 | + withAltGr: string; |
| 11 | + withShiftAltGr: string; |
| 12 | +} |
| 13 | +export interface IWindowsKeyboardMapping { |
| 14 | + [code: string]: IWindowsKeyMapping; |
| 15 | +} |
| 16 | +export interface ILinuxKeyMapping { |
| 17 | + value: string; |
| 18 | + withShift: string; |
| 19 | + withAltGr: string; |
| 20 | + withShiftAltGr: string; |
| 21 | +} |
| 22 | +export interface ILinuxKeyboardMapping { |
| 23 | + [code: string]: ILinuxKeyMapping; |
| 24 | +} |
| 25 | +export interface IMacKeyMapping { |
| 26 | + value: string; |
| 27 | + valueIsDeadKey: boolean; |
| 28 | + withShift: string; |
| 29 | + withShiftIsDeadKey: boolean; |
| 30 | + withAltGr: string; |
| 31 | + withAltGrIsDeadKey: boolean; |
| 32 | + withShiftAltGr: string; |
| 33 | + withShiftAltGrIsDeadKey: boolean; |
| 34 | +} |
| 35 | +export interface IMacKeyboardMapping { |
| 36 | + [code: string]: IMacKeyMapping; |
| 37 | +} |
| 38 | + |
| 39 | +export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping; |
| 40 | + |
| 41 | +export function getKeyMap(): IKeyboardMapping; |
| 42 | + |
| 43 | +export interface IWindowsKeyboardLayoutInfo { |
| 44 | + name: string; |
| 45 | + id: string; |
| 46 | + text: string; |
| 47 | +} |
| 48 | + |
| 49 | +export interface ILinuxKeyboardLayoutInfo { |
| 50 | + model: string; |
| 51 | + layout: string; |
| 52 | + variant: string; |
| 53 | + options: string; |
| 54 | + rules: string; |
| 55 | +} |
| 56 | + |
| 57 | +export interface IMacKeyboardLayoutInfo { |
| 58 | + id: string; |
| 59 | + localizedName: string; |
| 60 | + lang: string; |
| 61 | +} |
| 62 | + |
| 63 | +export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo; |
| 64 | + |
| 65 | +export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo; |
| 66 | + |
| 67 | +export function onDidChangeKeyboardLayout(callback: () => void): void; |
| 68 | + |
| 69 | +export function isISOKeyboard(): boolean | undefined; |
0 commit comments