Skip to content

[Feature] Customisable keybinds in config #647

@jones-josh

Description

@jones-josh

SwayNC already has a good keyboard-only user experience. It'd be improved by the ability to change the binds, especially j and k for navigating between entries. I have 2 options in mind:

  • create a conflig flag like keyboard-shortcuts-vim which changes Up/Down to j/k and similar
  • create a config list entry that allows specifying a (optionally partial) set of key overrides over the default keybinds

I prefer the latter and have started implementation but being entirely new to vala it might take me a little bit, so figured I'd open an issue for discussion before I have something ready for PR.

Current idea is to have a KeyboardAction enum, use a Gee.TreeMultiMap<string, KeyboardAction> held in the config instance then in the keyboard callbacks we just check if that key has a relevant action we want to consume.

Think the only nontrivial part is the multimap config parsing, would you accept this being specific to this bind config or would you like it to be generic as in extract_array and extract_hashtable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions