Read the statement by Michael Teeuw here.
Getting keyboard input
-
I’ve started working on a set of modules where a user can chat with the mirror via keybaord input and get responses from some kind of neural network ai. I’m running into a brick wall on getting keyboard input. Right now I’m using an inputbox but keypresses don’t seem to show up in it. I know a little python but webdev and javascript is new to me. Here is the very basic code I have so far and thanks for the help!
Module.register("keyboard", { getDom: function() { var wrapper = document.createElement("div"); var form = document.createElement("form"); var inputbox = document.createElement("input"); inputbox.setAttribute("type", "text"); form.appendChild(inputbox); wrapper.appendChild(form); Log.info(this.name + " worked."); return wrapper; } }); -
Did you find a solution? I will make a new post because I have the same issue.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login