Keyboard shortcuts clash

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
tunny
Posts: 1
Joined: Thu Jan 21, 2016 4:03 am

Keyboard shortcuts clash

Post by tunny » Thu Jan 21, 2016 9:26 pm

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.

User avatar
Holger
Site Admin
Posts: 2758
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Keyboard shortcuts clash

Post by Holger » Mon Jan 25, 2016 4:08 pm

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?

filbo
Posts: 212
Joined: Fri Jun 20, 2014 10:06 am

Re: Keyboard shortcuts clash

Post by filbo » Mon Jan 25, 2016 7:31 pm

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)

Post Reply