MCPcopy
hub / github.com/MrNothing/AI-Blocks / handleKey

Method handleKey

Sources/src/Model/Controllers/InputService.js:21–41  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

19 }
20
21 handleKey(event) {
22 window.service.keysPressed[event.key]=1;
23
24 if(this.isKeyPressed("Control"))
25 {
26 if(event.key == 's'){
27 if(window.service.project!=null)
28 window.service.menuUI.saveProjectClicked();
29 }
30
31 if(event.key == 'c' && document.activeElement.id=="body"){
32 if(window.service.project!=null)
33 window.service.copySelection();
34 }
35
36 if(event.key == 'v' && document.activeElement.id=="body"){
37 if(window.service.project!=null)
38 window.service.pasteSelection();
39 }
40 }
41 }
42
43 handleKeyUp(event)
44 {

Callers

nothing calls this directly

Calls 4

isKeyPressedMethod · 0.95
saveProjectClickedMethod · 0.80
copySelectionMethod · 0.80
pasteSelectionMethod · 0.80

Tested by

no test coverage detected