Comments (9)
I found the problem: I used hand-controls and it works only with laser-controls.
from aframe-super-keyboard.
I also can't work this out, seems like some functional documentation would really help out here
from aframe-super-keyboard.
Yes, you are alright, the documentation should help more. Meanwhile:
You have the superkeyboardinput
event. 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.
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.
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.
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.
Yup, that fixed it. Problem is following the README.
from aframe-super-keyboard.
README is using v 1.0, latest in dist is 2.1. will pull request readme to update.
from aframe-super-keyboard.
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)
- Opacity render issue HOT 4
- With cursor I have to look away from the keyboard to add each character HOT 2
- Keyboard removes itself on second entry HOT 1
- superkeyboardchange is not passing value HOT 1
- On pressing "T" on physical keyboard, it randomly adds a string to input field HOT 1
- Be able to use both hands HOT 5
- Build and dist after last merge HOT 1
- Interferes with laser-controls HOT 2
- Add multiple hands for VR use case HOT 1
- Examples not working on oculus quest HOT 6
- Laser tracking accuracy issue at smaller scales HOT 2
- Can't find controller when using superhands HOT 1
- Keyboard is not interactable in immersive VR mode HOT 3
- Fantasy Wood example showing custom keyboard layouts does not work HOT 2
- Allow non-VR controls HOT 1
- Properly close keyboard HOT 1
- Raycaster shound not be injected to the hand if keyboard `show` is set to false
- I can't type text on examples using Oculus. HOT 1
- the keyboard hide text elements behind it HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aframe-super-keyboard.