-
I wanted to work on a new config layout to split the server and TUI config settings (so that not too much is loaded) and refactor some property layouts, but have come across a question regarding keybinding config layout: currently keybindings look like: [keys.global_quit.code]
type = "Char"
args = "q"
[keys.global_quit.modifier]
type = "KeyModifiers"
bits = 0 but i wanted to make them simpler by only having one entry, but cant decide which modifier layout to go for: choice 1: one string, delimited with [keys.global_quit]
key = "q"
modifiers = "SHIFT+CONTROL+ALT" choice 2: a sequence (vec) of strings: [keys.global_quit]
key = "q"
modifiers = ["SHIFT", "CONTROL", "ALT"] or any other suggestions? Note: i plan on treating any extra occurrence as one (like EDIT: choice 3: combined key and modifiers: [keys.global_quit]
key = "q+SHIFT+CONTROL+ALT" choice 3.5: basically choice 3, but flatter: [keys]
global_quit = "q+SHIFT+CONTROL+ALT" Note: maybe allow both 3 and 3.5 similar to how Cargo.toml's dependencies section works? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The original format is based on the serde feature of tui-realm. For new format, we'll have to parse the format by ourselves. Which is easier to parse? For me, I prefer 3.5 because the config file is more concise. |
Beta Was this translation helpful? Give feedback.
-
Maybe all lowercase is better as uppercase is confusing combined with shift. Also mod key + letter key is more natural. |
Beta Was this translation helpful? Give feedback.
The original format is based on the serde feature of tui-realm. For new format, we'll have to parse the format by ourselves. Which is easier to parse? For me, I prefer 3.5 because the config file is more concise.