1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<html>
<head>
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
<link rel="stylesheet" type="text/css" href="links/main.css"/>
<link rel="stylesheet" type="text/css" href="links/theme.css"/>
<title>Orca</title>
</head>
<body>
<script>
const app = require('electron').remote.app
const Terminal = require('./scripts/terminal')
const terminal = new Terminal()
terminal.install(document.body)
terminal.controller.add("default","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Orca') },"CmdOrCtrl+,")
terminal.controller.add("default","*","Fullscreen",() => { app.toggleFullscreen() },"CmdOrCtrl+Enter")
terminal.controller.add("default","*","Hide",() => { app.toggleVisible() },"CmdOrCtrl+H")
terminal.controller.add("default","*","Inspect",() => { app.inspect() },"CmdOrCtrl+.")
terminal.controller.add("default","*","Reset",() => { terminal.reset() },"CmdOrCtrl+Backspace")
terminal.controller.add("default","*","Quit",() => { terminal.unload(); app.exit() },"CmdOrCtrl+Q")
terminal.controller.add("default","File","New",() => { terminal.source.new() },"CmdOrCtrl+N")
terminal.controller.add("default","File","Save",() => { terminal.source.save() },"CmdOrCtrl+S")
terminal.controller.add("default","File","Save As",() => { terminal.source.saveAs() },"CmdOrCtrl+Shift+S")
terminal.controller.add("default","File","Open",() => { terminal.source.open() },"CmdOrCtrl+O")
terminal.controller.add("default","File","Resume",() => { terminal.source.resume() })
terminal.controller.add("default","File","Revert",() => { terminal.source.revert() })
terminal.controller.add("default","Edit","Select All",() => { terminal.cursor.selectAll() },"CmdOrCtrl+A")
terminal.controller.add("default","Edit","Erase Selection",() => { terminal.cursor.erase() },"Backspace")
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","Toggle Insert Mode",() => { terminal.cursor.toggleMode(1) },"CmdOrCtrl+I")
terminal.controller.add("default","Edit","Block Comment",() => { terminal.cursor.comment() },"CmdOrCtrl+/")
terminal.controller.add("default","Edit","Goto",() => { terminal.commander.start('goto:') },"/")
terminal.controller.add("default","Edit","Undo",() => { terminal.history.undo() },"CmdOrCtrl+Z")
terminal.controller.add("default","Edit","Redo",() => { terminal.history.redo() },"CmdOrCtrl+Shift+Z")
terminal.controller.add("default","Program","Incr. Col",() => { terminal.modGrid(1,0) },"]")
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","Clock","Play/Pause",() => { terminal.clock.togglePlay() },"Space")
terminal.controller.add("default","Clock","Reset Frame",() => { terminal.clock.resetFrame() },"CmdOrCtrl+Shift+N")
terminal.controller.add("default","Clock","Incr. Speed",() => { terminal.clock.mod(1) },">")
terminal.controller.add("default","Clock","Decr. Speed",() => { terminal.clock.mod(-1) },"<")
terminal.controller.add("default","Clock","Incr. Speed(10x)",() => { terminal.clock.mod(10,true) },"CmdOrCtrl+>")
terminal.controller.add("default","Clock","Decr. Speed(10x)",() => { terminal.clock.mod(-10,true) },"CmdOrCtrl+<")
terminal.controller.add("default","View","Zoom In",() => { terminal.modZoom(0.25) },"CmdOrCtrl+=")
terminal.controller.add("default","View","Zoom Out",() => { terminal.modZoom(-0.25) },"CmdOrCtrl+-")
terminal.controller.add("default","View","Zoom Reset",() => { terminal.modZoom(1,true) },"CmdOrCtrl+0")
terminal.controller.add("default","View","Toggle Retina",() => { terminal.toggleRetina() },"`")
terminal.controller.addSpacer('default', 'View', 'commander')
terminal.controller.add("default","View","Toggle Commander",() => { terminal.commander.start() },"CmdOrCtrl+K")
terminal.controller.add("default","View","Run Commander",() => { terminal.commander.run() },"Enter")
terminal.controller.add("default","Midi","Default")
terminal.controller.add("default","UDP","Default")
terminal.controller.add("default","OSC","Default")
terminal.controller.add("default","Theme","Open Theme",() => { terminal.theme.open() },"CmdOrCtrl+Shift+O")
terminal.controller.add("default","Theme","Reset Theme",() => { terminal.theme.reset() },"CmdOrCtrl+Shift+Backspace")
terminal.controller.addSpacer('default', 'Theme', 'Download')
terminal.controller.add("default","Theme","Download Themes..",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Themes') })
terminal.controller.commit()
window.addEventListener('load', () => { terminal.start(); })
</script>
</body>
</html>
|