core icon indicating copy to clipboard operation
core copied to clipboard

setting a non-standard keymap in settings causes it to incorrectly write all keymap info to device-settings.toml

Open rcoreilly opened this issue 1 year ago • 4 comments

Describe the bug

see tittle

How to reproduce

see title.

Example code

No response

Relevant output

No response

Platform

macOS

rcoreilly avatar Feb 26 '24 23:02 rcoreilly

This is expected behavior; non-default saving is based on struct fields, and there is only one struct field for the whole key map, as it is just a map.

kkoreilly avatar Feb 26 '24 23:02 kkoreilly

It should just save the one KeyMap field, not the KeyMaps:

KeyMap = 'MacEmacs'

[KeyMaps]
[[KeyMaps.Value]]
...

KeyMaps is Set = false

image

rcoreilly avatar Feb 27 '24 00:02 rcoreilly

This happens when you change anything in device settings, so the issue is that it can not correctly detect whether the KeyMap and KeyMaps are non-default.

kkoreilly avatar Mar 06 '24 00:03 kkoreilly

this just bit me in the latest update..

rcoreilly avatar Apr 06 '24 18:04 rcoreilly

I fixed this in f293200860f11ace9e60a6eeb98f01a3ee0dff54.

kkoreilly avatar Jun 26 '24 01:06 kkoreilly