From 9b92f5b64749b6c7a5164aacfb5718725f4996ad Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 12 Apr 2023 17:58:40 -0400 Subject: [PATCH] Fix CTRL-C, CTRL-V not working on remapped keyboards. --- src/litegraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litegraph.js b/src/litegraph.js index a51b14463..96aed7b06 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7003,7 +7003,7 @@ LGraphNode.prototype.executeAction = function(action) block_default = true; } - if (e.code == "KeyC" && (e.metaKey || e.ctrlKey) && !e.shiftKey) { + if ((e.keyCode === 67) && (e.metaKey || e.ctrlKey) && !e.shiftKey) { //copy if (this.selected_nodes) { this.copyToClipboard(); @@ -7011,7 +7011,7 @@ LGraphNode.prototype.executeAction = function(action) } } - if (e.code == "KeyV" && (e.metaKey || e.ctrlKey)) { + if ((e.keyCode === 86) && (e.metaKey || e.ctrlKey)) { //paste this.pasteFromClipboard(e.shiftKey); }