From 014adade68f9687925f57a126b383e9ec12e69e7 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Wed, 29 Jun 2022 18:00:30 -0700 Subject: [PATCH] added feature flag to disable hotkey-hooking --- src/modules/external_interface.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/external_interface.rs b/src/modules/external_interface.rs index 50d2181..2fe9df6 100644 --- a/src/modules/external_interface.rs +++ b/src/modules/external_interface.rs @@ -17,6 +17,7 @@ pub const OPTIONS_PATH: &str = "./options.json"; pub const OPTIONS_PATH: &str = "./options.json"; */ +#[cfg(feature = "with_hotkeys")] pub fn create_keyboard_hooks(channel_tx: crossbeam_channel::Sender, close_flag: workctl::sync_flag::SyncFlagRx) { let tx_1 = channel_tx.clone(); @@ -32,6 +33,11 @@ pub fn create_keyboard_hooks(channel_tx: crossbeam_channel::Sender, clos inputbot::handle_input_events(close_flag); } +#[cfg(feature = "no_hotkeys")] +pub fn create_keyboard_hooks(channel_tx: crossbeam_channel::Sender, close_flag: workctl::sync_flag::SyncFlagRx) { + return +} + pub struct Hotkeys { pub hotkeys: serde_json::Value, }