tyoeer / Chaoshead

A level editor, scripting interface, campaign editor, and reverse engineering tool for Levelhead
Apache License 2.0
4 stars 1 forks source link

The control quantum bug: or why isn't copy/paste/save working? #37

Closed tyoeer closed 1 year ago

tyoeer commented 1 year ago

The input system sometimes unpredictably stops recognising control presses. The lowest level action doesn't pick up on it any more. \ This only appears happens to some inputs: copy, paste, check limits, reload, save. Select All tends to keep working. The connecting factor appears the LevelRoot, though that might be coincidence. \ Slothy has mentioned that copy/paste stopped working even though it worked before in the same instance, suggesting it isn't related to the order in which the actions get parsed/added (which so happens to be undefined). \ They mentioned: "right clicking and dragging on nothing was the most recent thing I remember doing before it stopped working ...but I can't recreate that"

tyoeer commented 1 year ago

Theories:

tyoeer commented 1 year ago

Usually there are 19 actions triggered by lctrl, when Check Limits stopped working there were only 10.

tyoeer commented 1 year ago

The missing inputs that use lctrl:

The 9 that keep working:

tyoeer commented 1 year ago

Which ones stop working appears to be consistent: (first part is the load order, second part is the inputs listening for lctrl)

editor: copy,deselectAll,checkLimits,cut,placeAndReleaseHand,placeHand,releaseHand,gotoScripts,reload,save,selectOnly,paste,quickRunScript,selectAdd,selectAll,deselectSub,selectAreaModifier,delete,gotoLevelEditor,deselectArea,resize,
modal: cancel,
main: toggleFullscreen,click,
textInput: left,right,removeLeft,removeRight,defocusDetection,
camera: down,left,right,up,drag,

10: editor.deselectAll, editor.selectOnly, editor.selectAdd, editor.selectAll, editor.deselectSub, editor.deselectArea, camera.down, camera.left, camera.right, camera.up, 
main: click,toggleFullscreen,
editor: deselectAll,copy,checkLimits,cut,delete,placeHand,releaseHand,gotoScripts,reload,selectOnly,paste,quickRunScript,selectAdd,selectAll,save,selectAreaModifier,placeAndReleaseHand,gotoLevelEditor,deselectArea,resize,deselectSub,
modal: cancel,
textInput: left,right,removeLeft,removeRight,defocusDetection,
camera: left,right,drag,down,up,

10: editor.deselectAll, editor.selectOnly, editor.selectAdd, editor.selectAll, editor.deselectArea, editor.deselectSub, camera.left, camera.right, camera.down, camera.up, 
camera: up,down,left,right,drag,
main: click,toggleFullscreen,
editor: resize,save,placeAndReleaseHand,placeHand,gotoLevelEditor,gotoScripts,reload,delete,selectOnly,selectAdd,selectAll,selectAreaModifier,deselectArea,quickRunScript,deselectSub,deselectAll,paste,cut,releaseHand,checkLimits,copy,
modal: cancel,
textInput: left,removeRight,defocusDetection,right,removeLeft,

10: camera.up, camera.down, camera.left, camera.right, editor.selectOnly, editor.selectAdd, editor.selectAll, editor.deselectArea, editor.deselectSub, editor.deselectAll, 
tyoeer commented 1 year ago

The difference between the inputs: those that use lctrl break, those that use key: lctrl don't.

tyoeer commented 1 year ago

It goes wrong if the mouse module gets loaded first: it claims lctrl is a valid mouse button