Moved commands out to the outer event loop.

This commit is contained in:
Adam Harrison committed 2021-11-14 15:41:28 -05:00
1 parent 6f53ee1b69
commit ce2ec9f442
6 files changed
+21 -7

No files matched your search

+4
View File
@@ -85,6 +85,10 @@ function keymap.on_key_pressed(k, ...)
return false
end
local click_prefixes = { "", "d", "t" }
function keymap.on_mouse_pressed(button, x, y, clicks)
return keymap.on_key_pressed(click_prefixes[((clicks - 1) % 3) + 1] .. button:sub(1,1) .. "click", x, y, clicks)
end
function keymap.on_key_released(k)
local mk = modkey_map[k]