-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Configuration file support #304
Description
I wanted to create configuration file for keybindings, but I am not sure how to approach it.
Preferably I would want to to save the VirtualKeyCode to the configuration file as it's human readable and load it, but I can only go one way: from the code to string (by using Debug implementation which isn't the best). I could implement giant match for going the other way, but that seems to be a thing that winit should be doing (maybe with something like str_to_enum_derive crate).
As serialising/deserialising VirtualKeyCode isn't the easiest right now I thought I could do it with scan codes. I don't think that hardcoding the scan codes would be the best idea even just for the default settings, so I looked way to convert VirtualKeyCode to one, but there doesn't seem to be way to do this either.
So I am left wondering how configuration file should be done.