Garlov / AutoRhythm

Open source rhythm game with auto generated note maps.
https://garlov.itch.io/auto-rhythm
MIT License
22 stars 6 forks source link

Cannot be played when Z and X keys are browser shortcuts! #37

Open duritia opened 3 years ago

duritia commented 3 years ago

In Firefox, Vivaldi and probably in all browsers based on the Chromium core, at least, the game cannot be played because Z and X are the keys used to go to the last/next page in active tab history. Otherwise, they will be ignored by the browser, and not passed to whatever script is running in a site, except to writing in forms.

A bad solution is to change 4 lines in the archive src/configs/gameConfig.js to be:

[...]
        Z: {
            CODE: 90,      // change the letter inside these single quotes
            KEY: 'Q',
        },
        X: {
            CODE: 88,
            KEY: 'W',      // change the letter inside these single quotes
        },
        COMMA: {
            CODE: 188,
            KEY: '1',      // change the letter inside these single quotes
        },
        DOT: {
            CODE: 190,
            KEY: '2',      // change the letter inside these single quotes
        },

[...]
Garlov commented 3 years ago

Thanks for the info. I'll see if I have the time to look at this soon. This is an easy fix, if you want to get it running locally, but we have an issue for configurable keymaps #1, that should be a more permanent solution.