diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-21 20:19:54 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-21 20:22:57 +0300 |
| commit | 866aaf740e10fcfce169aaf81380ea0257fbe272 (patch) | |
| tree | f815392b7c6b24a7c0de14e655bd635656383813 /src/server/keybindings.rs | |
| parent | ca579c402d5668560ca13059f82c03178be18b2a (diff) | |
refactor: separate server client boundaries
Diffstat (limited to 'src/server/keybindings.rs')
| -rw-r--r-- | src/server/keybindings.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server/keybindings.rs b/src/server/keybindings.rs new file mode 100644 index 00000000..262463ff --- /dev/null +++ b/src/server/keybindings.rs @@ -0,0 +1,17 @@ +use crate::app; + +pub(crate) fn app_keybindings(app: &app::App) -> crate::config::LiveKeybindConfig { + crate::config::LiveKeybindConfig { + prefix: (app.state.prefix_code, app.state.prefix_mods), + keybinds: app.state.keybinds.clone(), + } +} + +pub(crate) fn apply_keybindings( + app: &mut app::App, + keybindings: &crate::config::LiveKeybindConfig, +) { + app.state.prefix_code = keybindings.prefix.0; + app.state.prefix_mods = keybindings.prefix.1; + app.state.keybinds = keybindings.keybinds.clone(); +} |
