diff --git a/dotscape b/dotscape index 9803d13..713f42d 100755 Binary files a/dotscape and b/dotscape differ diff --git a/fcore/normal-mode.sml b/fcore/normal-mode.sml index 836e18a..3f8f6d1 100644 --- a/fcore/normal-mode.sml +++ b/fcore/normal-mode.sml @@ -226,10 +226,13 @@ struct fun updateNum (model: app_type, newNum) = (AppWith.modalNum (model, newNum), []) + fun clearNum model = updateNum (model, 0) + fun updateRed model = (AppWith.r model, []) fun updateGreen model = (AppWith.g model, []) fun updateBlue model = (AppWith.b model, []) fun updateAlpha model = (AppWith.a model, []) + fun changeLayer model = (AppWith.layer model, []) fun selectCursorColour (model: app_type) = let @@ -333,10 +336,12 @@ struct | MOUSE_LEFT_RELEASE => mouseMoveOrRelease model | MOUSE_LEFT_CLICK => mouseLeftClick model | NUM num => updateNum (model, num) + | KEY_ESC => clearNum model | KEY_R => updateRed model | KEY_G => updateGreen model | KEY_B => updateBlue model | KEY_A => updateAlpha model + | KEY_L => changeLayer model | KEY_C => selectCursorColour model | KEY_W => updateCanvasWidth model | KEY_H => updateCanvasHeight model @@ -362,5 +367,4 @@ struct | KEY_SPACE => enterOrSpaceCoordinates model | FILE_BROWSER_AND_PATH {fileBrowser, path} => handleFileBrowserAndPathInNormalMode (model, fileBrowser, path) - | KEY_ESC => (model, []) end diff --git a/imperative-shell/input-callbacks.sml b/imperative-shell/input-callbacks.sml index 17cff91..a784a93 100644 --- a/imperative-shell/input-callbacks.sml +++ b/imperative-shell/input-callbacks.sml @@ -58,13 +58,17 @@ struct key = Input.KEY_S () andalso action = Input.PRESS () andalso mods = 0x002 then Mailbox.send (mailbox, KEY_CTRL_S) + else if + key = Input.KEY_L () andalso action = Input.PRESS () andalso mods = 0 + then + Mailbox.send (mailbox, KEY_L) else if (* ctrl-l *) key = Input.KEY_L () andalso action = Input.PRESS () andalso mods = 0x002 then Mailbox.send (mailbox, KEY_CTRL_L) else if - (* ctrl-l *) + (* ctrl-e *) key = Input.KEY_E () andalso action = Input.PRESS () andalso mods = 0x002 then Mailbox.send (mailbox, KEY_CTRL_E) diff --git a/message-types/input-msg.sml b/message-types/input-msg.sml index 42e5667..e8929a1 100644 --- a/message-types/input-msg.sml +++ b/message-types/input-msg.sml @@ -16,6 +16,7 @@ struct | KEY_H | KEY_M | KEY_C + | KEY_L | KEY_BACKSPACE | KEY_CTRL_S | KEY_CTRL_L