How to use the @lumino/domutils.Platform.IS_WIN function in @lumino/domutils

To help you get started, we’ve selected a few @lumino/domutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / lumino / packages / commands / src / index.ts View on Github external
function normalizeKeys(options: IKeyBindingOptions): string[] {
    let keys: string[];
    if (Platform.IS_WIN) {
      keys = options.winKeys || options.keys;
    } else if (Platform.IS_MAC) {
      keys = options.macKeys || options.keys;
    } else {
      keys = options.linuxKeys || options.keys;
    }
    return keys.map(normalizeKeystroke);
  }