Skip to main content

Mountain/Command/Keybinding/
GetUserKeybindings.rs

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