From 95dc0bfc21e8a6dc838e24059eb2c6c7644d6b64 Mon Sep 17 00:00:00 2001
From: Ramesh Kumar <ramesh.p@matriotsolutions.com>
Date: Wed, 1 Sep 2021 18:59:43 +0530
Subject: [PATCH] TMSS-847: Added Copy on CTRL+Insert and paste on SHIFT+Insert
 keys in windows and linux

---
 .../src/routes/Scheduling/excelview.schedulingset.js      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js
index 59da24b4b44..95fda18c627 100644
--- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js
+++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.js
@@ -2262,15 +2262,15 @@ export class SchedulingSetCreate extends Component {
     async clipboardEvent(e){
         var key = e.which || e.keyCode;
         var ctrl = e.ctrlKey ? e.ctrlKey : ((key === 17 || key === 91) ? true : false);
-        if ( key === 67 && ctrl ) {     //Ctrl+C
+        if ( ctrl && (key === 67 || key === 45) ) {     //Ctrl+C(Windows & linux) or Cmd+C(Mac) or Ctrl+Insert(windows & linux)
             this.copyToClipboard();
         } 
-        else if ( key === 86 && ctrl ) {    // Ctrl+V
-            try{
+        else if ( (ctrl && key === 86) || (e.shiftKey && key === 45) ) {    // Ctrl+V(windows & linux) or Cmd+V or Shift+Insert(windows & linux)
+            try {
                 var clipText = await this.readClipBoard();
                 await this.setState({clipText: clipText});
                 this.copyFromClipboard();
-            }catch(error) {
+            }   catch(error) {
                 //this.setState({disabled: 'none'})
                 this.callBackFunction = this.copyFromClipboard;
                 this.onCancel = () => {
-- 
GitLab