From 96ca098f4bcb9d6cf1a0465a8aeade2db9294e1d Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Wed, 6 Jul 2016 08:50:43 -0400
Subject: PLT-3473 Made shortcuts only work for CMD on OSX (#3479)

* checked for CMD key

* changed method of checking
---
 webapp/utils/utils.jsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'webapp/utils/utils.jsx')

diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 65a203ab0..ee2c4099f 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -32,6 +32,14 @@ export function cleanUpUrlable(input) {
     return cleaned;
 }
 
+export function isMac() {
+    return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
+}
+
+export function cmdOrCtrlPressed(e) {
+    return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey);
+}
+
 export function isChrome() {
     if (navigator.userAgent.indexOf('Chrome') > -1) {
         return true;
-- 
cgit v1.2.3-1-g7c22

