From dbb2d28ad6f6fd18317d059dcf8d3b355d55c13b Mon Sep 17 00:00:00 2001 From: Akash Nimare Date: Thu, 20 Sep 2018 13:33:13 +0530 Subject: [PATCH] hotkey: Update deprecation notice for '*' hotkey. This PR updates the shortcut of the deprecation notice for '*' hotkey. On macOS, it should be 'Cmd + s' instead of 'Ctrl'. --- static/js/ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/ui.js b/static/js/ui.js index 5ce14f94c7..790feaea07 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -134,10 +134,11 @@ exports.get_hotkey_deprecation_notice = function (originalHotkey, replacementHot var shown_deprecation_notices = []; exports.maybe_show_deprecation_notice = function (key) { var message; + var isCmdOrCtrl = /Mac/i.test(navigator.userAgent) ? "Cmd" : "Ctrl"; if (key === 'C') { message = exports.get_hotkey_deprecation_notice('C', 'x'); } else if (key === '*') { - message = exports.get_hotkey_deprecation_notice('*', 'Ctrl + s'); + message = exports.get_hotkey_deprecation_notice("*", isCmdOrCtrl + " + s"); } else { blueslip.error("Unexpected deprecation notice for hotkey:", key); return;