feat(config): add support for search-related fields in legacy config
This commit is contained in:
parent
0cc52ccf63
commit
0d70cd8405
|
@ -156,6 +156,12 @@ fn default_post_inject_delay() -> u64 {
|
|||
fn default_wait_for_modifiers_release() -> bool {
|
||||
false
|
||||
}
|
||||
fn default_search_trigger() -> Option<String> {
|
||||
Some("jkj".to_string())
|
||||
}
|
||||
fn default_search_shortcut() -> Option<String> {
|
||||
Some("ALT+SPACE".to_string())
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct LegacyConfig {
|
||||
|
@ -282,6 +288,12 @@ pub struct LegacyConfig {
|
|||
#[serde(default = "default_modulo_path")]
|
||||
pub modulo_path: Option<String>,
|
||||
|
||||
#[serde(default = "default_search_trigger")]
|
||||
pub search_trigger: Option<String>,
|
||||
|
||||
#[serde(default = "default_search_shortcut")]
|
||||
pub search_shortcut: Option<String>,
|
||||
|
||||
#[serde(default = "default_wait_for_modifiers_release")]
|
||||
pub wait_for_modifiers_release: bool,
|
||||
}
|
||||
|
|
|
@ -360,11 +360,11 @@ impl Config for LegacyInteropConfig {
|
|||
}
|
||||
|
||||
fn search_trigger(&self) -> Option<String> {
|
||||
None
|
||||
self.config.search_trigger.clone()
|
||||
}
|
||||
|
||||
fn search_shortcut(&self) -> Option<String> {
|
||||
None
|
||||
self.config.search_shortcut.clone()
|
||||
}
|
||||
|
||||
fn undo_backspace(&self) -> bool {
|
||||
|
|
Loading…
Reference in New Issue
Block a user