* fix: Crash on malformed config
* fix: Have default mappings when missing config
---------
Co-authored-by: Victoria Brekenfeld <4404502+Drakulix@users.noreply.github.com>
It seems to derive `CosmicConfigEntry`, we need to use `_` in property
names, because `_` isn't mapped to `-` and there doesn't seem to be a
mechanism like `#[serde(rename)]`.
It seems good to be consistent anyway. So this seems good to change,
unless we really like using `-` for names on disk, then cosmic-panel
needs to be changed.
`CosmicConfigEntry` also requires `PartialEq`, which is easy enough to
add.
This will break existing input settings, which will have to be
re-applied with the new locations. Cosmic-settings also need to be
updated for this.
This is not a setting handled by libinput; we have to scale the
scrolling ourselves.
This should match the behavior of the `scroll_factor` defined in
sway-input(5).
This adds a `input-default` setting, which is used for input settings if a
device isn't set in `input-devices`. More awkwardly, it also adds an
`input-touchpad` setting, which is used instead of `input-default` for
touchpad devices, so we can separate mouse and touchpad settings even
though they use the same capability and settings.
This no longer sets the input config, and only reads it. If we add a UI
for per-device config, we'll need some IPC mechanism to list connected
devices. (Assuming cosmic-settings can't use libinput directly for that.)
This moves `InputConfig` and `XkbConfig` to a new `cosmic-comp-config`
crate, so they can be used in `cosmic-settings`.
I noticed https://github.com/pop-os/cosmic-comp/issues/17 again, but
this time I realized num lock was on. Hopefully this is the only cause
of that issue (and caps lock, but that is easier to notice).
I don't think we would event want either of these states to be part of a
key binding. And `KeyModifiers` doesn't seem to be used anywhere else
this would be relevant. So they can be ignored. This should be more
similar to how keybindings are handled elsewhere.