A case for 'Shift+Insert' added. Fixes #114103 (#114520)

This is a continualtion of the fix 7e5937. See comments for this commit.

'Shift+Insert' combination  leads to double insertion of clipboard text.
For some reason, similar treatment for other secondary Copy and Cut keys is not required

Co-authored-by: Serge Lamikhov-Center <to_serge@users.sourceforge.net>
This commit is contained in:
Serge Lamikhov-Center 2021-01-20 00:13:35 +02:00 committed by GitHub
parent a11dd7cd48
commit 049735e8d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -319,7 +319,8 @@
*/
function isCopyPasteOrCut(e) {
const hasMeta = e.ctrlKey || e.metaKey;
return hasMeta && ['c', 'v', 'x'].includes(e.key.toLowerCase());
const shiftInsert = e.shiftKey && e.key.toLowerCase() === 'insert';
return (hasMeta && ['c', 'v', 'x'].includes(e.key.toLowerCase())) || shiftInsert;
}
/**