Closed fernandojsg closed 6 years ago
A default state and a common set of bindings that exist across all states are pretty different ideas, so I agree if default was actually behaving as common it should be renamed.
That said I do think its a good idea to have an explicit default state as relying on ordering of object keys as the order is not technically guaranteed and you may also want no bindings set by default.
For the common case, I wonder if the answer is just allowing multiple input states to be active? Not sure yet if that's useful or just confusing..
@netpro2k yep, as discussed in other issues, default
state is something needed and addressed here https://github.com/fernandojsg/aframe-input-mapping-component/pull/20
Regarding the common
we have two kind of commons here:
device
levels common, vive-controls, windows-motion...
: Right now this is already enabled but I'm not sure if we should deprecate it https://github.com/fernandojsg/aframe-input-mapping-component/issues/21actionSet
levels common, task1, task2
: thinking deeply about it, the idea behind the proposal was the same for the current common
implementation: to avoid manual rewriting and have a easy to read json. But it could have some issues as we may be in situations where we don't want to activate a common
mapping, so we will need to map to a nop event some of the common mappings. Regarding allowing multiple input states I'm also not sure if that could be confusing or not.
Opening a new issue (https://github.com/fernandojsg/aframe-input-mapping-component/issues/22) to keep that discussion there and by now we'll just close this issue.
The same way we have
common
for mappings that apply to all the controllers. We could have acommon
mapping that applies to any other mapping. Basically it was what I was doing right now: https://github.com/fernandojsg/aframe-input-mapping-component/blob/d6cd8b2dae32bbe17c56232fd679634b115aa520/index.js#L121 but I was not clear enough that I even filed an issue (https://github.com/fernandojsg/aframe-input-mapping-component/issues/10) because of that :DSo removing the
default
state will make the system to activate the first mapping on the list by default.So we could have the following and still be able to teleport on every task without need to duplicate that code.
/cc @dmarcos @netpro2k