Merge pull request #1310 from Cube14yt/mobile_keybinds

2 NEW MODS IN ONE DAY?!?!?!
This commit is contained in:
slweeb 2025-11-28 13:52:34 -05:00 committed by GitHub
commit c6e1fbffd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 0 deletions

21
mods/mobile_keybinds.js Normal file
View File

@ -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)
}
})()