Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Is 'keyboardlisteningelement' supported in 5.3?

Discussion in 'WebGL' started by CurtisLinden, May 19, 2016.

  1. CurtisLinden

    CurtisLinden

    Joined:
    Oct 26, 2015
    Posts:
    10
    I am now addressing the input field bug in the rewrite of our UI for http://blocksworld.com.

    I have used

    #if !UNITY_EDITOR && UNITY_WEBGL
    WebGLInput.captureAllKeyboardInput = false;
    #endif

    Unfortunately - It seems canvas is not designed to be programmatically focused. I don't want to force my users to click - the captureAllKeyboardInput = true worked well - except for killing our search field.

    Does keyboardlisteningelement still have support?

    Thank you.
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Possibly, you could reenable WebGLInput.captureAllKeyboardInput as soon as the user is done with the search field?
     
    CurtisLinden likes this.
  3. CurtisLinden

    CurtisLinden

    Joined:
    Oct 26, 2015
    Posts:
    10
    Thank you for your consideration.

    I'll expose a toggle to the javascript to enable/disable input and then I can control it based on the UI state.