diff --git a/frontend_tests/node_tests/hotkey.js b/frontend_tests/node_tests/hotkey.js index bd521d2806..bbbe013491 100644 --- a/frontend_tests/node_tests/hotkey.js +++ b/frontend_tests/node_tests/hotkey.js @@ -252,7 +252,7 @@ run_test('basic_chars', () => { assert_mapping('d', 'drafts.launch'); // Next, test keys that only work on a selected message. - var message_view_only_keys = '@*+>RjJkKsSuvi:GM'; + var message_view_only_keys = '@+>RjJkKsSuvi:GM'; // Check that they do nothing without a selected message global.current_msg_list.empty = return_true; diff --git a/static/js/hotkey.js b/static/js/hotkey.js index d5b23850f4..874f082273 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -74,6 +74,7 @@ var keydown_either_mappings = { }; var keypress_mappings = { + 42: {name: 'star_deprecated', message_view_only: true}, // '*' 43: {name: 'thumbs_up_emoji', message_view_only: true}, // '+' 45: {name: 'toggle_message_collapse', message_view_only: true}, // '-' 47: {name: 'search', message_view_only: false}, // '/' @@ -660,6 +661,9 @@ exports.process_hotkey = function (e, hotkey) { case 'C_deprecated': ui.maybe_show_deprecation_notice('C'); return true; + case 'star_deprecated': + ui.maybe_show_deprecation_notice('*'); + return true; } if (current_msg_list.empty()) { diff --git a/static/js/ui.js b/static/js/ui.js index b0621dcd51..456a15b4cb 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -128,6 +128,8 @@ exports.maybe_show_deprecation_notice = function (key) { var message; if (key === 'C') { message = i18n.t('We\'ve replaced the "C" hotkey with "x" to make this common shortcut easier to trigger.'); + } else if (key === '*') { + message = i18n.t('We\'ve replaced the "*" hotkey with "Ctrl + s" to make this common shortcut easier to trigger.'); } else { blueslip.error("Unexpected deprecation notice for hotkey:", key); return;