mirror of
https://github.com/zulip/zulip.git
synced 2025-10-31 20:13:46 +00:00
hotkeys: Map CTRL + . to narrow to compose box target.
Also adds relevant tests and documentation. We currently do not narrow to a new topic, and instead just narrow to the stream. Similarly, we do not narrow to a PM if any of the recipients are invalid.
This commit is contained in:
committed by
Tim Abbott
parent
3079cf803c
commit
ee3b4f3ee9
@@ -55,6 +55,7 @@ var keydown_ctrl_mappings = {
|
||||
var keydown_cmd_or_ctrl_mappings = {
|
||||
75: {name: 'search_with_k', message_view_only: false}, // 'K'
|
||||
83: {name: 'star_message', message_view_only: true}, // 's'
|
||||
190: {name: 'narrow_to_compose_target', message_view_only: true}, // '.'
|
||||
};
|
||||
|
||||
var keydown_either_mappings = {
|
||||
@@ -552,6 +553,11 @@ exports.process_hotkey = function (e, hotkey) {
|
||||
}
|
||||
}
|
||||
|
||||
if (event_name === 'narrow_to_compose_target') {
|
||||
narrow.to_compose_target();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Process hotkeys specially when in an input, select, textarea, or send button
|
||||
if (exports.processing_text()) {
|
||||
// Note that there is special handling for enter/escape too, but
|
||||
|
||||
Reference in New Issue
Block a user