question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Be able to use both hands

See original GitHub issue

Thank you for building this lovely keyboard!

In the VR experience I’m building, I allow the user to use both hands interchangeably (or together). I’d love to be able to extend that to the keyboard, allowing both hands to type, instead of having to pick one of the hands.

Is this possible with this keyboard? It doesn’t appear to be… I tried this attribute:

super-keyboard="hand: .left-hand, .right-hand;"

… but it only accepted hovers from the left hand.

Looking at the code I suppose it would need to be updated to support two simultaneous hovers, and when clicks happen to know which hand do the clicking, so it doesn’t seem like a trivial change.

Anyway, seems like it would be nice!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dmarcoscommented, Dec 15, 2020

@arthurmougin I agree it would be useful to use two hands. We have to juggle other priorities and we have no time to address this at the moment. We will be more than happy to take PRs if you have bandwidth. Thanks folks.

0reactions
iangilmancommented, Dec 24, 2020

I don’t have the time to make this change, but here are some thoughts on how to do it, if you want to, @arthurmougin:

The main reason it only supports a single controller is that the keyHover property is a single value, rather than an array. I would change it to an array (or add a second property called something like otherKeyHover if the maintainers (e.g. @dmarcos & @ngokevin) feel it’s important to maintain backward compatibility), and go throughout the code to change its handling to support multiple hovers.

You then need to update the click handler to be able to differentiate between which controller got clicked. I forget how to do that, but it should be standard A-frame stuff.

You also need to update the hand attribute, hand property, and raycaster property to support multiples. At least that’s what I’m seeing, looking at the code. There may be more. At any rate, by starting with keyHover and working your way up, you’ve got a clear path of what to do.

Because there are a number of properties that need to go from singular to multiple, it might make sense to make a new kind of object that has all of those properties, and create an array to store multiple copies, one for each controller. That would be a bigger architecture change, though, and therefore would affect any existing users of this library that are expecting to be able to manipulate the internals. That said, none of the internals seem to be part of the external API, so people shouldn’t be relying on that anyway. Ultimately that’s a decision for the maintainers; hopefully they can chime in on where they stand there.

I hope this is helpful!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ambidextrous - Definition, Meaning & Synonyms
Ambidextrous people have the ability to use both hands with equal dexterity. But the ambidextrous probably prefer to write with their right hands, ......
Read more >
Ambidexterity - Wikipedia
Ambidexterity is the ability to use both the right and left hand equally well. ... When referring to objects, the term indicates that...
Read more >
Ambidextrous Definition & Meaning - Merriam-Webster
The meaning of AMBIDEXTROUS is using both hands with equal ease or dexterity. How to use ambidextrous in a sentence. Did you know?...
Read more >
Things You Didn't Know About Ambidextrous People
The rarest form of ambidexterity is when people can use both hands with strong skill, all the time. These people can be called...
Read more >
11 Facts About the Ambidextrous - Mental Floss
Ambidextral refers to those who can use both hands as well as a right-hander's right hand (so, really well), and ambisinistral can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found