231
public readonly keyAriaLabel: string | null
232
) { }
234
>
235
>
export type SingleModifierChord = 'ctrl' | 'shift' | 'alt' | 'meta';
236
>
237
>
/**
238
>
* A resolved keybinding. Consists of one or multiple chords.
239
>
*/
240
>
export abstract class ResolvedKeybinding {
241
>
/**
242
>
* This prints the binding in a format suitable for displaying in the UI.
243
>
*/
244
>
public abstract getLabel(): string | null;
245
>
/**
246
>
* This prints the binding in a format suitable for ARIA.
247
>
*/
248
>
public abstract getAriaLabel(): string | null;
249
>
/**
250
>
* This prints the binding in a format suitable for electron's accelerators.
251
>
* See https://github.com/electron/electron/blob/master/docs/api/accelerator.md
252
>
*/
253
>
public abstract getElectronAccelerator(): string | null;
254
>
/**
255
>
* This prints the binding in a format suitable for user settings.
256
>
*/
257
>
public abstract getUserSettingsLabel(): string | null;
258
>
/**
259
>
* Is the user settings label reflecting the label?
260
>
*/
261
>
public abstract isWYSIWYG(): boolean;
262
>
/**
263
>
* Does the keybinding consist of more than one chord?
264
>
*/
265
>
public abstract hasMultipleChords(): boolean;
266
>
/**
267
>
* Returns the chords that comprise of the keybinding.
268
>
*/
269
>
public abstract getChords(): ResolvedChord[];
270
>
/**
271
>
* Returns the chords as strings useful for dispatching.
272
>
* Returns null for modifier only chords.
273
>
* @example keybinding "Shift" -> null
274
>
* @example keybinding ("D" with shift == true) -> "shift+D"
275
>
*/
276
>
public abstract getDispatchChords(): (string | null)[];
277
>
/**
278
>
* Returns the modifier only chords as strings useful for dispatching.
279
>
* Returns null for chords that contain more than one modifier or a regular key.
280
>
* @example keybinding "Shift" -> "shift"
281
>
* @example keybinding ("D" with shift == true") -> null
282
>
*/
283
>
public abstract getSingleModifierDispatchChords(): (SingleModifierChord | null)[];
284
>
}