js-duk: Implement input events
Replaces bind(K_BIND_INPUT, ...).
function handler(ev)
{
switch (ev.type) {
...
case "input":
line = ev.data;
mw.print("You inputted: " + line);
mw.say("⭐ " + line + " ⭐ ");
return false; // Suppress normal processing
...
}
}
mw.onevent.push(handler);
Loading
Please sign in to comment