mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Merge pull request #110902 from Wscats/patch-5
Support keybinding browser context keys
This commit is contained in:
commit
d758a74bf7
|
@ -6,8 +6,9 @@
|
|||
import { Event } from 'vs/base/common/event';
|
||||
import { isFalsyOrWhitespace } from 'vs/base/common/strings';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { isMacintosh, isLinux, isWindows, isWeb } from 'vs/base/common/platform';
|
||||
import { userAgent, isMacintosh, isLinux, isWindows, isWeb } from 'vs/base/common/platform';
|
||||
|
||||
let _userAgent = userAgent || '';
|
||||
const STATIC_VALUES = new Map<string, boolean>();
|
||||
STATIC_VALUES.set('false', false);
|
||||
STATIC_VALUES.set('true', true);
|
||||
|
@ -16,6 +17,11 @@ STATIC_VALUES.set('isLinux', isLinux);
|
|||
STATIC_VALUES.set('isWindows', isWindows);
|
||||
STATIC_VALUES.set('isWeb', isWeb);
|
||||
STATIC_VALUES.set('isMacNative', isMacintosh && !isWeb);
|
||||
STATIC_VALUES.set('isEdge', _userAgent.indexOf('Edg/') >= 0);
|
||||
STATIC_VALUES.set('isFirefox', _userAgent.indexOf('Firefox') >= 0);
|
||||
STATIC_VALUES.set('isChrome', _userAgent.indexOf('Chrome') >= 0);
|
||||
STATIC_VALUES.set('isSafari', _userAgent.indexOf('Safari') >= 0);
|
||||
STATIC_VALUES.set('isIPad', _userAgent.indexOf('iPad') >= 0);
|
||||
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
|
|
Loading…
Reference in a new issue