Description
I was looking around for a way to do multiple modifier keys for an action and was unable to find any in configuration files or documentation. After doing a little digging, it looks like it's not currently supported, as keys are stored at zellij-tile::data::Key and doesn't have an option for multiple modifier keys. One solution could be to change Keys to be a struct rather than an enum and have fields for modifiers and key values.
This might cause some issues with other language keyboards if they have different modifier keys (maybe composition keys?), but for a US keyboard, I believe these are the only modifier keys:
- Ctrl
- Alt
- Shift
- Windows
For storing multiple modifiers, I believe either using the bitfield crate (https://crates.io/crates/bitfield) or a struct of bools would work.
Supporting multiple modifiers will also require changes the the configuration file format. I'm not sure what would be the best way to represent a keybind, but something like this could work:
keybinds:
normal:
- action: [SwitchToMode: Locked,]
key: [{modifiers: [Ctrl, Alt], key: 'g'},]