Skip to content

Commit

Permalink
exclude windows messages from mac/linux parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk committed May 27, 2024
1 parent e37481e commit 29ed32c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser/src/cfg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
3 changes: 3 additions & 0 deletions parser/src/custom_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -15,7 +16,9 @@ pub enum CustomAction {
Cmd(Vec<String>),
CmdOutputKeys(Vec<String>),
PushMessage(Vec<SimpleSExpr>),
#[cfg(any(target_os = "windows", target_os = "unknown"))]
WinSendMessage(WinMsg),
#[cfg(any(target_os = "windows", target_os = "unknown"))]
WinPostMessage(WinMsg),
Unicode(char),
Mouse(Btn),
Expand Down

0 comments on commit 29ed32c

Please sign in to comment.