Add named keyboard binding modes (#32)
Add named keyboard shortcut maps with an Escape exit and a panel indicator. Keep press/release ownership across transitions, validate remapped Escape keys, and cancel stale repeats and focus previews. Give the indicator ownership of the panel while a mode is active. Close popovers, collapse Morph, and keep Live Activities data current without resizing the hidden panel. Document configuration and transition behavior. Validation: 1,519 workspace Rust tests passed; 70 Python tests passed. Workspace build, formatting, Clippy, and Settings configuration validation passed. Opt-in native desktop checks were not rerun because Weston is absent. Related: #5.
This commit is contained in:
1 parent
6b0d903ad0
commit
7d58eeb65d
28 files changed
+1258
-35
No files matched your search
+13
-2
@@ -461,6 +461,9 @@ pub struct Ferese {
|
||||
gap_config: GapConfig,
|
||||
pub(crate) input_settings: InputSettings,
|
||||
pub(crate) bindings: BindingSet,
|
||||
pub(crate) binding_modes: crate::config::BindingModes,
|
||||
pub(crate) binding_mode_pressed: HashSet<Keycode>,
|
||||
pub(crate) binding_mode_repeats: HashMap<Keycode, crate::config::Binding>,
|
||||
workspace_auto_back_and_forth: bool,
|
||||
pub(crate) window_rules: Vec<WindowRule>,
|
||||
pub(crate) theme_settings: ThemeSettings,
|
||||
@@ -560,6 +563,7 @@ pub struct RuntimeConfig {
|
||||
pub gap_config: GapConfig,
|
||||
pub input_settings: InputSettings,
|
||||
pub bindings: Vec<Binding>,
|
||||
pub(crate) binding_modes: crate::config::BindingModes,
|
||||
pub workspace_auto_back_and_forth: bool,
|
||||
pub window_rules: Vec<WindowRule>,
|
||||
pub theme_settings: ThemeSettings,
|
||||
@@ -750,6 +754,9 @@ impl Ferese {
|
||||
gap_config: config.gap_config,
|
||||
input_settings: config.input_settings,
|
||||
bindings: config.bindings.into(),
|
||||
binding_modes: config.binding_modes,
|
||||
binding_mode_pressed: HashSet::new(),
|
||||
binding_mode_repeats: HashMap::new(),
|
||||
workspace_auto_back_and_forth: config.workspace_auto_back_and_forth,
|
||||
window_rules: config.window_rules,
|
||||
theme_settings: config.theme_settings,
|
||||
@@ -862,7 +869,7 @@ impl Ferese {
|
||||
}
|
||||
|
||||
let layout_changed = changed(&["layout", "scrolling", "workspaces"]);
|
||||
let bindings_changed = changed(&["bindings", "commands"]);
|
||||
let bindings_changed = changed(&["bindings", "binding_modes", "commands"]);
|
||||
let input_changed = changed(&["input"]);
|
||||
let daemons_changed = changed(&["autostart"]);
|
||||
let lock_changed = changed(&["lock_screen"]);
|
||||
@@ -946,8 +953,12 @@ impl Ferese {
|
||||
}
|
||||
self.gap_config = config.gap_config;
|
||||
self.input_settings = config.input_settings;
|
||||
if bindings_changed {
|
||||
if bindings_changed || input_changed {
|
||||
self.binding_mode_repeats.clear();
|
||||
self.bindings = config.bindings.into();
|
||||
self.binding_modes = config.binding_modes;
|
||||
self.cancel_focus_cycle();
|
||||
self.send_shell_snapshots();
|
||||
}
|
||||
self.workspace_auto_back_and_forth = config.workspace_auto_back_and_forth;
|
||||
if bindings_changed || input_changed {
|
||||
|
||||
Reference in new issue
Block a user