Page 1 of 1

Keyboard shortcuts clash

Posted: Thu Jan 21, 2016 9:26 pm
by tunny
Apologies for arriving & immediately posting buglets. Love your work here btw.

Issue: Set a keyboard shortcut for the letter 's' to fast save a tape. The :ist command no longer works as 's' now tries to save a tape.

Reproducible: Y

Workaround: Set fast save tape to another letter or buy me a new keyboard which doesn't have sucky Fn keys.

Suggested fix: User warning &/| stop processing hotkeys as soon as : is seen.

Re: Keyboard shortcuts clash

Posted: Mon Jan 25, 2016 4:08 pm
by Holger
Apologies for arriving & immediately posting buglets.
That's what the forum is for -- welcome to the forum, tunny! :-)
Issue: Set a keyboard shortcut for the letter 's' to fast save a tape. The :ist command no longer works as 's' now tries to save a tape.
Hmm, indeed. :-o
Suggested fix: User warning &/| stop processing hotkeys as soon as : is seen.
The problem with this solution is that the program does not know (or currently does not check) when a ":" initiated cheat code is fully entered, so it does not know when being in "cheat code mode" or "recognize shortcuts mode".

Regarding user warnings: The cheat codes should be "silent", and therefore should not trigger user warnings etc..

Another solution would be to define a "cheat code ends here" character, like ";", so it would be ":ist;" instead of just ":ist". Then keyboard shortcuts between ":" and ";" could be ignored. But this would be nasty for those who are not aware of the existence of cheat codes and accidentally entered a ":" character in the main menu.

I think a good solution could be to simply support all cheat codes in both lower and upper case characters, so ":ist" and ":IST" would both work the same, so ":IST" could be used if there is a "i", "s" or "t" key defined as a keyboard shortcut.

What do you think about it?

Re: Keyboard shortcuts clash

Posted: Mon Jan 25, 2016 7:31 pm
by filbo
I like the ':' ... ';' idea, perhaps with two modifications:

1. ';' or ENTER both work
2. time out of the "cheat code" entry mode after no chars entered for some timeout period, which should be plenty long (like 30s, for accessibility)