DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/UI/KeybindingRemove.rs
1//! Wire method: `keybinding:remove`.
2
3use std::sync::Arc;
4
5use serde_json::Value;
6
7use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
8
9pub async fn Fn(RunTime:Arc<ApplicationRunTime>, Arguments:Vec<Value>) -> Result<Value, String> {
10 let CommandId = Arguments
11 .first()
12 .and_then(|V| V.as_str())
13 .ok_or("keybinding:remove requires commandId".to_string())?;
14
15 RunTime
16 .Environment
17 .ApplicationState
18 .Feature
19 .Keybindings
20 .RemoveKeybinding(CommandId);
21
22 Ok(Value::Null)
23}