diff --git a/lua/CC Tweaked/tutel/tutel-host.lua b/lua/CC Tweaked/tutel/tutel-host.lua index f909401..db352c9 100644 --- a/lua/CC Tweaked/tutel/tutel-host.lua +++ b/lua/CC Tweaked/tutel/tutel-host.lua @@ -234,6 +234,7 @@ registerEventListener("modem_message", handleMessages) local GLFW_KEY_DOWN = 264 local GLFW_KEY_UP = 265 local GLFW_KEY_ENTER = 257 +local GLFW_KEY_BACKSPACE = 259 local logOffset = 0 @@ -269,6 +270,11 @@ function handleConsoleKeys(key) -- executeCommand(commandBuffer) log.info("Executed command: %s", commandBuffer) commandBuffer = "" + elseif key == GLFW_KEY_BACKSPACE then + local len = commandBuffer:len() + if len >= 1 then + commandBuffer = commandBuffer:sub(0, len - 1) + end end end