screenshot remapping of keymaps is NOT saved in the setting

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
UFO
Posts: 21
Joined: Sat Jun 23, 2012 6:56 pm

screenshot remapping of keymaps is NOT saved in the setting

Post by UFO »

select global options - keymaps - (Alt+s = save screenshot) - choose clear mapping - apply and ok

then quit scummvm and execute it again

"choose clear mapping" of keymaps setting is NOT saved in the next execution of scummvm
is there a way to save this setting?
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: screenshot remapping of keymaps is NOT saved in the setting

Post by Praetorian »

I am not very familiar with the keymapper system, and this *sounds* like a bug, and I can confirm it also happens with keymaps for games (game domain) and other keymaps for Global (those that are not "empty" by default).

I can also see the cause of it. It's because we don't store to the scummvm config file values that are empty.
This is ensured by this line in our current code: https://github.com/scummvm/scummvm/blob ... r.cpp#L373

But I do wonder if this actually has a good effect (or even an intended effect) albeit an inconsistent one.

I think typically the goal of clearing a mapping is to remove (potentially multiple) existing key combos for the action and then add a new one starting from a "clean slate" for the mapping (instead of adding an additional key combo on top of the existing ones). But if the user does not do the last step (ie. add a new mapping), which has to be done manually, then the action remains unmapped. And, while this is not bad for the "screenshot" action, it could likely be bad for mouse movement action controls (especially for backends that use keys for that) or basic interaction actions because that would lock the user out of using the ScummVM app or properly playing games with it.

As is, we do accept the clearing of the mapping in the current ScummVM session, but we reset it to default if ScummVM is restarted, thus why I wrote "inconsistent". This inconsistency allows the user to "test" what they've done, but prevents them from being locked out of properly using the app, since a restart would revert to the defaults (or the previous non-empty setting) for the unmapped actions (those that are not unmapped by default).

I do believe it's worth opening a ticket for this, though, so that someone more familiar with the keymapper could evaluate it. So please do open a ticket on the bug tracker (I'll add the info from my post there too).

Maybe we'd need some way to let the keymapper know which actions are too important to be mapped to nothing, and which are ok to do so.
Post Reply