- move_button.onclick = function() {
- if (tui.mode.available_actions.includes("move")) {
- server.send(['TASK:MOVE', direction]);
- } else if (tui.mode.available_actions.includes("move_explorer")) {
- explorer.move(direction);
- tui.full_refresh();
- };
+ let move_repeat;
+ move_button.onmousedown = function() {
+ move_repeat = window.setInterval(function() {
+ if (tui.mode.available_actions.includes("move")) {
+ server.send(['TASK:MOVE', direction]);
+ } else if (tui.mode.available_actions.includes("move_explorer")) {
+ explorer.move(direction);
+ tui.full_refresh();
+ };
+ }, 100);