Closed harshavb closed 3 years ago
Current idea is to go ahead and make a PiouslyKeyBinding : KeyBinding, IComparable
that can then be sorted whenever used by KeyBindingStore
, and then use SortedListJsonConverter
from osu-framework to setup the storage of the keybindings.
SortedListJsonConverter
simply exists for internal usage, not actually containing code to serialize a sorted list. We will have to make our own using a JsonWriter.
A TypedListConverter
might be of use.
I think I have some ideas for this, but I'm worried that any method could theoretically be tampered with to allow users to open whatever file is saved and change the action to some that may be potential harmful. Any ideas how to circumvent this? I was thinking about using base64 but that can be easily reversed; could be a good deterrent though.
The keybinding file should be editable, as it acts as a configuration file. Piously should just fail to load or load default keybindings if the config file is tampered with in an unexpected way.
Redundant; moving from KeyBindingStore to PiouslyConfigManager: closing issue
We need to implement a method to store KeyBindings contained in the KeyBindingStore.