Skip to content

Commit

Permalink
feat(tap-hold): allow tap-hold nesting in hold action
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed Aug 9, 2022
1 parent 2007321 commit 28f90e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,9 +874,8 @@ fn parse_tap_hold(
parse_timeout(&ac_params[1]).map_err(|e| anyhow!("invalid tap-timeout: {}", e))?;
let tap_action = parse_action(&ac_params[2], parsed_state)?;
let hold_action = parse_action(&ac_params[3], parsed_state)?;
if matches!(tap_action, Action::HoldTap { .. }) || matches!(hold_action, Action::HoldTap { .. })
{
bail!("tap-hold is not allowed inside of tap-hold")
if matches!(tap_action, Action::HoldTap { .. }) {
bail!("tap-hold does not work in the tap-action of tap-hold")
}
Ok(sref(Action::HoldTap(sref(HoldTapAction {
config,
Expand Down

0 comments on commit 28f90e8

Please sign in to comment.