aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop/sources
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2019-03-30 00:22:42 +0900
committerDevine Lu Linvega <[email protected]>2019-03-30 00:22:42 +0900
commit29286fd0e982ac8d343e676c9e153d57783c883e (patch)
treeb29c54a10494e2a3345c2495b0281a402b9a2b4d /desktop/sources
parentbd259296d791c84f82a1e5f80933dd57ec5ac8c0 (diff)
downloadOrca-29286fd0e982ac8d343e676c9e153d57783c883e.tar.gz
Orca-29286fd0e982ac8d343e676c9e153d57783c883e.zip
Added touch trigger option
Diffstat (limited to 'desktop/sources')
-rw-r--r--desktop/sources/index.html5
-rw-r--r--desktop/sources/scripts/cursor.js7
-rw-r--r--desktop/sources/scripts/keyboard.js1
3 files changed, 11 insertions, 2 deletions
diff --git a/desktop/sources/index.html b/desktop/sources/index.html
index 7701591..c19b080 100644
--- a/desktop/sources/index.html
+++ b/desktop/sources/index.html
@@ -38,6 +38,8 @@
terminal.controller.add("default","Edit","Copy Selection",() => { terminal.cursor.copy() },"CmdOrCtrl+C")
terminal.controller.add("default","Edit","Cut Selection",() => { terminal.cursor.cut() },"CmdOrCtrl+X")
terminal.controller.add("default","Edit","Paste Selection",() => { terminal.cursor.paste() },"CmdOrCtrl+V")
+ terminal.controller.add("default","Edit","Trigger Selection",() => { terminal.cursor.trigger() },"Enter")
+ terminal.controller.add("default","Edit","Toggle Insert Mode",() => { terminal.cursor.toggleMode(1) },"Shift+Enter")
terminal.controller.add("default","Edit","Undo",() => { terminal.history.undo() },"CmdOrCtrl+Z")
terminal.controller.add("default","Edit","Redo",() => { terminal.history.redo() },"CmdOrCtrl+Shift+Z")
@@ -51,7 +53,8 @@
terminal.controller.add("default","Program","Decr. Col",() => { terminal.modGrid(-1,0) },"[")
terminal.controller.add("default","Program","Incr. Row",() => { terminal.modGrid(0,1) },"}")
terminal.controller.add("default","Program","Decr. Row",() => { terminal.modGrid(0,-1) },"{")
- terminal.controller.add("default","Program", "Next Clock", () => { terminal.nextClock() }, "Ctrl+Space")
+ terminal.controller.add("default","Program","Next Clock", () => { terminal.nextClock() }, "Ctrl+Space")
+
terminal.controller.add("default","View","Zoom In",() => { terminal.modZoom(0.25) },"CmdOrCtrl+=")
terminal.controller.add("default","View","Zoom Out",() => { terminal.modZoom(-0.25) },"CmdOrCtrl+-")
diff --git a/desktop/sources/scripts/cursor.js b/desktop/sources/scripts/cursor.js
index 1eddc0f..a43106a 100644
--- a/desktop/sources/scripts/cursor.js
+++ b/desktop/sources/scripts/cursor.js
@@ -97,6 +97,13 @@ function Cursor (terminal) {
this.y = pos.y
}
+ this.trigger = function () {
+ const operator = terminal.orca.operatorAt(this.x, this.y)
+ if (operator) {
+ operator.run()
+ }
+ }
+
this.toggleMode = function (val) {
this.mode = this.mode === 0 ? val : 0
}
diff --git a/desktop/sources/scripts/keyboard.js b/desktop/sources/scripts/keyboard.js
index 30d73d5..be77ed1 100644
--- a/desktop/sources/scripts/keyboard.js
+++ b/desktop/sources/scripts/keyboard.js
@@ -28,7 +28,6 @@ function Keyboard (terminal) {
if (event.metaKey) { return }
if (event.ctrlKey) { return }
- if (event.key === 'Enter') { terminal.cursor.toggleMode(1); return }
if (event.key === 'Backspace' || event.key === '.') { terminal.cursor.erase(); return }
if (event.key === ' ' && terminal.cursor.mode === 0) { terminal.togglePlay(); event.preventDefault(); return }
if (event.key === 'Escape') { terminal.clear(); terminal.isPaused = false; terminal.cursor.reset(); return }