GithubHelp home page GithubHelp logo

Comments (9)

andreeapav09 avatar andreeapav09 commented on June 1, 2024 1

I found the problem: I used hand-controls and it works only with laser-controls.

from aframe-super-keyboard.

DaryllConway avatar DaryllConway commented on June 1, 2024

I also can't work this out, seems like some functional documentation would really help out here

from aframe-super-keyboard.

feiss avatar feiss commented on June 1, 2024

Yes, you are alright, the documentation should help more. Meanwhile:

You have the superkeyboardinputevent. So:

  <script>
      AFRAME.registerComponent('my_keyboard_controller', {
        init: function(){
          this.el.addEventListener('superkeyboardinput', function(event){
            alert(event.value); // the text
          });
        }
      });
    </script>
...
<a-entity id="keyboard" super-keyboard my_keyboard-controller></a-entity>

sorry, I'm typing without trying, but this is how it should look like 🤞

from aframe-super-keyboard.

kylebakerio avatar kylebakerio commented on June 1, 2024

I have a semi-functional one up in my app, and am trying to get the input out of it. I tried just adding

window.addEventListener('superkeyboardchange', () => {
			console.log(arguments)
		})

and got nothing... same for input and dismiss. :/ will keep digging.

from aframe-super-keyboard.

kylebakerio avatar kylebakerio commented on June 1, 2024

for the record,

window.addEventListener('superkeyboardchange', function(event){
            console.log(event.detail.value); // the text
          });

works in the demo to get each keypress (and 'input' on enter, and I presume 'dismiss' on exit as in docs).

But those events are not firing for the keyboard when in my app... :(

from aframe-super-keyboard.

kylebakerio avatar kylebakerio commented on June 1, 2024

looking through the source I get downloaded to my site when I use the source recommended in the readme, I see that the only possible 'emit' values are 'keyboard-accepted' and 'keyboard-dismiss', which do not line up with what's in the docs, and do not give me the values input. Not sure if I have an older version or newer version, will try just downloading the dist file itself.

from aframe-super-keyboard.

kylebakerio avatar kylebakerio commented on June 1, 2024

Yup, that fixed it. Problem is following the README.

from aframe-super-keyboard.

kylebakerio avatar kylebakerio commented on June 1, 2024

README is using v 1.0, latest in dist is 2.1. will pull request readme to update.

from aframe-super-keyboard.

andreeapav09 avatar andreeapav09 commented on June 1, 2024

Putting 2.1 makes it even worse for me, with this when I click on keyboards I don't even see input value now; did you find this problem?

from aframe-super-keyboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.