Jump to content

GUI InputText - event/observable for enter key?


unintellisense
 Share

Recommended Posts

Hello,

I am using the GUI InputText, and would like to be able to react to the enter key being pressed. I see there is onBlurObservable, but unless I'm wrong I can't tell from the event whether it lost focus from the enter key or clicking away?

The use case I am trying to handle is a chatbox, where the enter key would invoke a function to handle the current contents of the InputText before clearing it. Thanks for reading!

 

Link to comment
Share on other sites

Thanks for the response, I see what you mean.

I will go ahead and do something like that for now. But, what do you think about a onEnterKeyObservable being added to InputText? I can submit a PR as it seems like it would be a pretty minor change (hardest part is knowing which of the generated files to actually add to my branch for the PR after building, looks like lots of totally unrelated files show diffs)?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...