Skip to content

Commit ecbde50

Browse files
authored
Merge pull request #378 from comfyanonymous/remapped_keyboard_fix
Fix CTRL-C, CTRL-V not working on remapped keyboards.
2 parents 0970a40 + 9b92f5b commit ecbde50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/litegraph.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7003,15 +7003,15 @@ LGraphNode.prototype.executeAction = function(action)
70037003
block_default = true;
70047004
}
70057005

7006-
if (e.code == "KeyC" && (e.metaKey || e.ctrlKey) && !e.shiftKey) {
7006+
if ((e.keyCode === 67) && (e.metaKey || e.ctrlKey) && !e.shiftKey) {
70077007
//copy
70087008
if (this.selected_nodes) {
70097009
this.copyToClipboard();
70107010
block_default = true;
70117011
}
70127012
}
70137013

7014-
if (e.code == "KeyV" && (e.metaKey || e.ctrlKey)) {
7014+
if ((e.keyCode === 86) && (e.metaKey || e.ctrlKey)) {
70157015
//paste
70167016
this.pasteFromClipboard(e.shiftKey);
70177017
}

0 commit comments

Comments
 (0)