etiennepinchon/aframe-material

Test enter keyboard

Closed this issue · 2 comments

Is there any other way to test the enter input on keyboard than this ?

let keyboard = document.querySelector('a-keyboard')
    keyboard.addEventListener('input', (e)=>{
      console.log(e)
      if(e.detail==='\n')
        console.log('SUBMIT')
    })

Hey @Nexir !

Alright done! I added the enter event to the keyboard as well as physical keyboard support (great for debugging, see the updated doc for more details) !

Let me know if you need anything else! :)

Ok man thank you ! Nice work btw, working like a charm !