laamaa / m8c

Cross-platform M8 tracker headless client
Other
377 stars 80 forks source link

Feat/jazzkeys keys config #143

Closed jmolero closed 2 months ago

jmolero commented 2 months ago

These changes should allow to set the jazzkeys keys in the config. It also has a fix for an issue I had after doing the changes, where the velocity/octaves were changing if holding the key, which made it difficult to use because it was skipping the values too fast.

@laamaa Can you take a look and see if it works ok for you? I tried to keep the previous numpad keys as the default in the config.

I think the readme could be updated if merging this feature.

Thanks!

laamaa commented 2 months ago

Thanks! The config stuff is a good addition. If repeating keys are a problem. would it be simpler to just check for the "repeat" variable in the triggering input event or use SDL_Keyup (that might feel a little weird though)? https://wiki.libsdl.org/SDL2/SDL_KeyboardEvent

jmolero commented 2 months ago

Yes, much simpler! I don't know much about SDL2 and didn't know about the repeat in the event, thanks for pointing it out. I have added a refactor commit that skips the repeat and key up to avoid the issue when holding the key.

laamaa commented 2 months ago

Looks good, thank you!