diff --git a/parser/src/cfg/mod.rs b/parser/src/cfg/mod.rs index f04fb3411..c2cc89100 100755 --- a/parser/src/cfg/mod.rs +++ b/parser/src/cfg/mod.rs @@ -1660,9 +1660,13 @@ fn parse_action_list(ac: &[SExpr], s: &ParserState) -> Result<&'static KanataAct CMD => parse_cmd(&ac[1..], s, CmdType::Standard), CMD_OUTPUT_KEYS => parse_cmd(&ac[1..], s, CmdType::OutputKeys), PUSH_MESSAGE => parse_push_message(&ac[1..], s), + #[cfg(any(target_os = "windows", target_os = "unknown"))] SEND_WMSG_SYNC => win_send_message(&ac[1..], s, SEND_WMSG_SYNC), + #[cfg(any(target_os = "windows", target_os = "unknown"))] SEND_WMSG_SYNC_A => win_send_message(&ac[1..], s, SEND_WMSG_SYNC_A), + #[cfg(any(target_os = "windows", target_os = "unknown"))] SEND_WMSG_ASYNC => win_post_message(&ac[1..], s, SEND_WMSG_ASYNC), + #[cfg(any(target_os = "windows", target_os = "unknown"))] SEND_WMSG_ASYNC_A => win_post_message(&ac[1..], s, SEND_WMSG_ASYNC_A), FORK => parse_fork(&ac[1..], s), CAPS_WORD | CAPS_WORD_A => { diff --git a/parser/src/custom_action.rs b/parser/src/custom_action.rs index c8eb2be57..358371d81 100644 --- a/parser/src/custom_action.rs +++ b/parser/src/custom_action.rs @@ -3,6 +3,7 @@ //! When adding a new custom action, the macro section of the config.adoc documentation may need to //! be updated, to include the new action to the documented list of supported actions in macro. +#[cfg(any(target_os = "windows", target_os = "unknown"))] use crate::cfg::WinMsg; use anyhow::{anyhow, Result}; use core::fmt; @@ -15,7 +16,9 @@ pub enum CustomAction { Cmd(Vec), CmdOutputKeys(Vec), PushMessage(Vec), + #[cfg(any(target_os = "windows", target_os = "unknown"))] WinSendMessage(WinMsg), + #[cfg(any(target_os = "windows", target_os = "unknown"))] WinPostMessage(WinMsg), Unicode(char), Mouse(Btn),