mirror of https://github.com/zulip/zulip.git
hotkeys: Add '@' as a hotkey to compose message with mention.
This commit is contained in:
parent
c80bad5b55
commit
e1d4fb90d7
|
@ -43,6 +43,7 @@ var hotkeys_shift_insensitive = {
|
|||
27: {name: 'escape', message_view_only: false}, // escape
|
||||
47: {name: 'search', message_view_only: false}, // '/'
|
||||
63: {name: 'show_shortcuts', message_view_only: false}, // '?'
|
||||
64: {name: 'compose_reply_with_mention', message_view_only: true}, // '@'
|
||||
65: {name: 'stream_cycle_backward', message_view_only: true}, // 'A'
|
||||
67: {name: 'compose_private_message', message_view_only: true}, // 'C'
|
||||
68: {name: 'stream_cycle_forward', message_view_only: true}, // 'D'
|
||||
|
@ -364,6 +365,11 @@ function process_hotkey(e) {
|
|||
case 'respond_to_author': // 'R': respond to author
|
||||
compose.respond_to_message({reply_type: "personal", trigger: 'hotkey pm'});
|
||||
return true;
|
||||
case 'compose_reply_with_mention': // '@': respond to message with mention to author
|
||||
compose.respond_to_message({trigger: 'hotkey'});
|
||||
var message = current_msg_list.selected_message();
|
||||
$("#new_message_content").val('@**' + message.sender_full_name + '** ');
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -20,6 +20,9 @@ Zulip keyboard shortcuts are divided into four categories:
|
|||
## Composing messages
|
||||
* **Reply to message** `Enter` `r` - This shortcut allows the user to begin replying to the selected message (outlined in blue).
|
||||
* **Reply to author** `R` - This shortcut allows the user to begin writing a private message to the author of the selected message (outlined in blue).
|
||||
* **Reply to message mentioning the author** `Enter` `@` - This
|
||||
shortcut allows the user to begin replying to the selected message
|
||||
(outlined in blue), @-mentioning the author of the selected message.
|
||||
* **New stream message** `c` - This shortcut allows the user to begin composing a new stream message.
|
||||
* **New private message** `C` - This shortcut allows the user to begin composing a new private message.
|
||||
* **Send message** `Tab key` then `Enter` - This shortcut allows the user to send the message that they've written.
|
||||
|
|
|
@ -76,6 +76,10 @@
|
|||
<td class="hotkey">Esc</td>
|
||||
<td class="definition">{% trans %}Cancel compose{% endtrans %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hotkey">@</td>
|
||||
<td class="definition">{% trans %}Compose a reply @-mentioning author{% endtrans %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue