mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
hotkeys: Add "p" to narrow to next unread PM thread.
This works simimlar to the "n" key for next topics.
This commit does a few things:
* It wires up the hotkey to an existing function
that could change narrows.
* It adds documentation.
* It adds logic to make sure the compose box does
not open.
@showell helped a bit with the wording of comments here.
Fixes #4874
This commit is contained in:
committed by
Steve Howell
parent
68664acf1f
commit
a75f0aa594
@@ -94,6 +94,7 @@ var keypress_mappings = {
|
||||
106: {name: 'vim_down', message_view_only: true}, // 'j'
|
||||
107: {name: 'vim_up', message_view_only: true}, // 'k'
|
||||
110: {name: 'n_key', message_view_only: false}, // 'n'
|
||||
112: {name: 'p_key', message_view_only: false}, // 'p'
|
||||
113: {name: 'query_streams', message_view_only: false}, // 'q'
|
||||
114: {name: 'reply_message', message_view_only: true}, // 'r'
|
||||
115: {name: 'narrow_by_recipient', message_view_only: true}, // 's'
|
||||
@@ -630,6 +631,9 @@ exports.process_hotkey = function (e, hotkey) {
|
||||
case 'n_key':
|
||||
narrow.narrow_to_next_topic();
|
||||
return true;
|
||||
case 'p_key':
|
||||
narrow.narrow_to_next_pm_string();
|
||||
return true;
|
||||
case 'open_drafts':
|
||||
drafts.launch();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user