-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontrols.lua
More file actions
29 lines (29 loc) · 1.18 KB
/
controls.lua
File metadata and controls
29 lines (29 loc) · 1.18 KB
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
return spectrum.Input.Controls {
-- stylua: ignore
controls = {
-- Controls can be mapped to keys, text, gamepad buttons, joystick axes, or mouse presses.
-- Prefix the control with the type, e.g. "axis:lefty-", "mouse:1", "button:rightshoulder", "text:>".
-- If no prefix is given, the control is assumed to be a key.
-- Controls can also be combinations of inputs, e.g. "lshift a" or "lctrl s".
-- See the LÖVE wiki for all of the constants.
move_upleft = { "q", "y" },
move_up = { "w", "k", "axis:lefty+" },
move_upright = { "e", "u" },
move_left = { "a", "h", "axis:leftx-" },
move_right = { "d", "l", "axis:leftx+" },
move_downleft = { "z", "b" },
move_down = { "s", "j", "axis:lefty-" },
move_downright = { "c", "n" },
wait = "x",
},
-- Pairs are controls that map to either 4 or 8 directions.
-- With only 4 directions, the order is up, left, right, down.
pairs = {
-- stylua: ignore
move = {
"move_upleft", "move_up", "move_upright",
"move_left", "move_right",
"move_downleft", "move_down", "move_downright"
},
},
}