script-8.github.io icon indicating copy to clipboard operation
script-8.github.io copied to clipboard

Reassign key layout (e.g. from A-B to A-Z)

Open colxi opened this issue 6 years ago • 2 comments

In my opinion the usage of A , B , SELECT and START (as labels) is very appropriate considering structure of the classical controllers. However when using a regular keyboard as input interface, the distance between the keys 'A' and 'B' makes the experience very hard. Is almost impossible to achieve any natural mechanics.

What do you think about providing a way to re-map the default keys to a custom layout ?

Something like this l: inputMap( keyboardKeyID , controllerButtonID ) Generate a binding between the provided key, and one of the four available buttons.

// Map any press on the key 83 ('S') to the key B
inputMap( 83 , 'B'  ); 
// Map any press on the key 68 ('D') to the key SELECT
inputMap( 68 , 'SELECT'  ); 

colxi avatar Feb 25 '19 15:02 colxi

I agree with A and B being just too far away. I am annoyed by it too! I don't know that I want to provide the ability to re-map keys, but I am considering switching it to A/Z.

gabrielflorit avatar Feb 25 '19 16:02 gabrielflorit

I think A-S would be a more relaxed position for the fingers, and even make Space (SELECT) usable with the thumb simultaneously

colxi avatar Feb 25 '19 17:02 colxi