|
| 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 | +declare module 'native-keymap' { |
| 7 | + export interface IWindowsKeyMapping { |
| 8 | + vkey: string; |
| 9 | + value: string; |
| 10 | + withShift: string; |
| 11 | + withAltGr: string; |
| 12 | + withShiftAltGr: string; |
| 13 | + } |
| 14 | + export interface IWindowsKeyboardMapping { |
| 15 | + [code: string]: IWindowsKeyMapping; |
| 16 | + } |
| 17 | + export interface ILinuxKeyMapping { |
| 18 | + value: string; |
| 19 | + withShift: string; |
| 20 | + withAltGr: string; |
| 21 | + withShiftAltGr: string; |
| 22 | + } |
| 23 | + export interface ILinuxKeyboardMapping { |
| 24 | + [code: string]: ILinuxKeyMapping; |
| 25 | + } |
| 26 | + export interface IMacKeyMapping { |
| 27 | + value: string; |
| 28 | + valueIsDeadKey: boolean; |
| 29 | + withShift: string; |
| 30 | + withShiftIsDeadKey: boolean; |
| 31 | + withAltGr: string; |
| 32 | + withAltGrIsDeadKey: boolean; |
| 33 | + withShiftAltGr: string; |
| 34 | + withShiftAltGrIsDeadKey: boolean; |
| 35 | + } |
| 36 | + export interface IMacKeyboardMapping { |
| 37 | + [code: string]: IMacKeyMapping; |
| 38 | + } |
| 39 | + |
| 40 | + export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping; |
| 41 | + |
| 42 | + export function getKeyMap(): IKeyboardMapping; |
| 43 | + |
| 44 | + export interface IWindowsKeyboardLayoutInfo { |
| 45 | + name: string; |
| 46 | + id: string; |
| 47 | + text: string; |
| 48 | + } |
| 49 | + |
| 50 | + export interface ILinuxKeyboardLayoutInfo { |
| 51 | + model: string; |
| 52 | + layout: string; |
| 53 | + variant: string; |
| 54 | + options: string; |
| 55 | + rules: string; |
| 56 | + } |
| 57 | + |
| 58 | + export interface IMacKeyboardLayoutInfo { |
| 59 | + id: string; |
| 60 | + localizedName: string; |
| 61 | + lang: string; |
| 62 | + } |
| 63 | + |
| 64 | + export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo; |
| 65 | + |
| 66 | + export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo; |
| 67 | + |
| 68 | + export function onDidChangeKeyboardLayout(callback: () => void): void; |
| 69 | + |
| 70 | + export function isISOKeyboard(): boolean | undefined; |
| 71 | +} |
0 commit comments