I think I can fix up the de-bounce stuff you've got in that lua. Have the controls be more responsive the moment you press a button and never repeat it even if you keep it held too long.
Download PressTest.luaLanguage: lua
local keys, lastkeys= {}, {}
local function UpdateKeys() lastkeys= keys; keys= input.get() end
local function Press(k) return keys[k] and not lastkeys[k] end
local function Fn()
UpdateKeys()
if Press("space") then
print("Hi, I'm some text! How are you?")
end
if Press("tilde") then
print("Quick! Put useful code here instead!")
end
end
gui.register(Fn)
This short piece of function stuff is roughly what I'd be using. And I'd make a separate set that replaces input.get() with joypad.getimmediate(1) for dealing with the controller stuff. Or, since I just offered a piece of code up there, you can make the changes yourself if you think you understand. It's your stuff, after all.
... As for whether this is a perfectly valid spot to place your multi-emulator code, I took a quick look around the forums. Honestly, this looks to me the best spot, as this is meant more for the emulators, playing games for fun, and not at all about TASing, and it certainly doesn't fit in "Other Emulators". The next best place is "Off topic", but, well... That's practically a catch-all.