Skip to content

Configuration file support #304

Closed
Closed

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.

Activity

  1. added
    S - api
    S - enhancement
    on Oct 5, 2017
  2. added
    H - help wanted
    C - needs discussion
    D - average
    P - low
    on May 6, 2018
  3. francesca64 commented on Nov 12, 2018

    @francesca64
    Member

    @WaDelma does the serde feature added in 0.18.0 resolve this for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionD - averageH - help wantedP - lowS - apiS - enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions