Sign in to follow this  
unintellisense

GUI InputText - event/observable for enter key?

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!

 

Share this post


Link to post
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)?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.