From b14547443267dbcc43c694836242e7fd789b3ad5 Mon Sep 17 00:00:00 2001 From: Cube14yt Date: Thu, 27 Nov 2025 20:56:39 +0800 Subject: [PATCH] Add files via upload --- mods/mobile_keybinds.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 mods/mobile_keybinds.js diff --git a/mods/mobile_keybinds.js b/mods/mobile_keybinds.js new file mode 100644 index 00000000..9afbeb6d --- /dev/null +++ b/mods/mobile_keybinds.js @@ -0,0 +1,21 @@ +(() => { + function runKeybind() { + promptInput("Input the keybind you want to run. (e.g. KeyA, Digit1, Backspace)", (keybind) => { + if (keybinds[keybind]) { + keybinds[keybind](); + } + }) + } + + if (isMobile) { + const keybindButton = document.createElement("button") + keybindButton.id = "keybindButton" + keybindButton.title = "Change static mode" + keybindButton.classList.add("controlButton") + keybindButton.onclick = () => { + runKeybind() + } + keybindButton.textContent = "Keybind" + document.getElementById("pauseButton").before(keybindButton) + } +})() \ No newline at end of file