Skip to content

Configuration file support #304

@WaDelma

Description

@WaDelma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions