Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Command/Keybinding/
GetUserKeybindings.rs

1//! Tauri command - return user-defined keybinding overrides. Stub
2//! returns an empty array; pending persistence layer wired through
3//! `KeybindingProvider`.
4//!
5//! ## Planned
6//!
7//! Hydrate from ApplicationState, including command id, chord, when
8//! clause, source extension, and conflict information for the keyboard
9//! shortcuts UI.
10
11use std::sync::Arc;
12
13use CommonLibrary::{Environment::Requires::Requires, Keybinding::KeybindingProvider::KeybindingProvider};
14use serde_json::{Value, json};
15use tauri::{AppHandle, Manager, Wry, command};
16
17use crate::{RunTime::ApplicationRunTime::ApplicationRunTime as Runtime, dev_log};
18
19#[command]
20pub async fn GetUserKeybindings(ApplicationHandle:AppHandle<Wry>) -> Result<Value, String> {
21	dev_log!("keybinding", "getting user keybindings for UI");
22
23	let RunTime = ApplicationHandle.state::<Arc<Runtime>>().inner().clone();
24
25	let _Provider:Arc<dyn KeybindingProvider> = RunTime.Environment.Require();
26
27	Ok(json!({ "keybindings": [] }))
28}