mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
copy_and_paste: Add documentation for keyboard shortcuts for pasting.
Fixes: #29209.
This commit is contained in:
@@ -80,6 +80,16 @@ export function adjust_mac_kbd_tags(kbd_elem_class: string): void {
|
||||
}
|
||||
|
||||
$(this).text(key_text);
|
||||
|
||||
// In case of shortcuts, the Mac equivalent of which involves extra keys,
|
||||
// we use data-mac-following-key attribute to append the extra key to the
|
||||
// previous key. Currently, this is used to append Opt to Cmd for the Paste
|
||||
// as plain text shortcut.
|
||||
const following_key = $(this).attr("data-mac-following-key");
|
||||
if (following_key !== undefined) {
|
||||
const $kbd_elem = $("<kbd>").text(following_key);
|
||||
$(this).after(" + ", $kbd_elem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user