Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity #2

Open
doubleactii opened this issue Jul 31, 2023 · 0 comments
Open

Case sensitivity #2

doubleactii opened this issue Jul 31, 2023 · 0 comments
Assignees
Labels
good first issue Community support is welcomed on this issue. An issue that is recommended for new contributors. Status: To do A planned feature. Type: Enhancement A request for a new feature. Type: Maintenance Something that is being worked on to improve the quality of it.

Comments

@doubleactii
Copy link
Member

Certain API can only be referenced via upper case.

ControllerInstance.isButtonPressed('A');
ControllerInstance.isButtonPressed('a');

Will return different results. The first API call is the valid one. Whereas the second one will always return the wrong result.

There should also be a standard on which casing is preferred in the module.

In the following API upper case is seen to be a preference as pButtonName is passed down in upper case, but it is not really concreted as the preference anywhere else.

GamepadManager.on('connect', function(pController) {
    pController.on('press', (pButtonName, pValue, pRepeat) => {
    });
});

Find a preferred casing and make the module use that casing throughout the module.
Allow different casing to be resolved in the internals of the module.

So that

ControllerInstance.isButtonPressed('a');

will internally be the same as

ControllerInstance.isButtonPressed('A');
@doubleactii doubleactii added Status: To do A planned feature. Type: Enhancement A request for a new feature. Type: Maintenance Something that is being worked on to improve the quality of it. good first issue Community support is welcomed on this issue. An issue that is recommended for new contributors. labels Jul 31, 2023
@doubleactii doubleactii self-assigned this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Community support is welcomed on this issue. An issue that is recommended for new contributors. Status: To do A planned feature. Type: Enhancement A request for a new feature. Type: Maintenance Something that is being worked on to improve the quality of it.
Projects
None yet
Development

No branches or pull requests

1 participant