p5.js-web-editor/client/utils/metaKey.js

17 lines
283 B
JavaScript
Raw Normal View History

const metaKey = (() => {
if (navigator != null && navigator.platform != null) {
return /^MAC/i.test(navigator.platform) ?
'Cmd' :
'Ctrl';
}
return 'Ctrl';
})();
2017-09-01 17:38:40 +00:00
const metaKeyName = metaKey === 'Cmd' ? '\u2318' : 'Ctrl';
export {
metaKey,
metaKeyName,
};