-
Notifications
You must be signed in to change notification settings - Fork 0
/
keymap.fs
51 lines (42 loc) · 964 Bytes
/
keymap.fs
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
namespace Solar
module Keymap =
[<Literal>]
let UP = 'w'
[<Literal>]
let DOWN = 's'
[<Literal>]
let LEFT = 'a'
[<Literal>]
let RIGHT = 'd'
[<Literal>]
let Z_UP = 'e'
[<Literal>]
let Z_DOWN = 'q'
[<Literal>]
let SCALE_UP = '.'
[<Literal>]
let SCALE_DOWN = ','
[<Literal>]
let PLANET_NEXT = '0'
[<Literal>]
let PLANET_BACK = '9'
[<Literal>]
let PLANET_GO = '8'
[<Literal>]
let CHANGE_PROJECTION = 'p'
[<Literal>]
let DT_SCALE_UP = '+'
[<Literal>]
let DT_SCALE_DOWN = '-'
[<Literal>]
let PAUSE = ' '
[<Literal>]
let TOGGLE_INFO = 'o'
[<Literal>]
let TOGGLE_ORBITS = 'i'
let isMoving (c : char) =
List.contains c [DOWN; UP; RIGHT; LEFT;
Z_DOWN; Z_UP;
SCALE_UP; SCALE_DOWN;
PLANET_GO;
CHANGE_PROJECTION]