Skip to main content

Mountain/Command/Keybinding/
CheckKeybindingConflicts.rs

1
2//! Tauri command - detect chord-sequence overlaps in the current
3//! keybinding registry. Stub returns no conflicts; pending real
4//! implementation that scans the resolved set and reports source +
5//! command for each clash.
6
7use std::sync::Arc;
8
9use CommonLibrary::{Environment::Requires::Requires, Keybinding::KeybindingProvider::KeybindingProvider};
10use serde_json::{Value, json};
11use tauri::{AppHandle, Manager, Wry, command};
12
13use crate::{RunTime::ApplicationRunTime::ApplicationRunTime as Runtime, dev_log};
14
15#[command]
16pub async fn CheckKeybindingConflicts(ApplicationHandle:AppHandle<Wry>, Keybinding:String) -> Result<Value, String> {
17	dev_log!("keybinding", "checking conflicts for keybinding: {}", Keybinding);
18
19	let RunTime = ApplicationHandle.state::<Arc<Runtime>>().inner().clone();
20
21	let _Provider:Arc<dyn KeybindingProvider> = RunTime.Environment.Require();
22
23	Ok(json!({ "conflicts": [] }))
24}