copy_and_paste: Add documentation for keyboard shortcuts for pasting.

Fixes: #29209.
This commit is contained in:
N-Shar-ma
2024-03-28 03:17:02 +05:30
committed by Tim Abbott
parent 7895b05284
commit 46147cd13c
4 changed files with 31 additions and 0 deletions

View File

@@ -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);
}
});
}