Skip to content

Commit

Permalink
Merge pull request #60 from inputlabs/fix-button-normal-encode
Browse files Browse the repository at this point in the history
Fixed button normal mode incorrectly encoded when there were modifiers
  • Loading branch information
marcos-diaz authored Jun 13, 2024
2 parents 31f5695 + 5b58c73 commit fd3a689
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,11 @@ export class CtrlButton extends CtrlSection {
let mode = 0
if (this.hold) mode += ButtonMode.HOLD
if (this.double) mode += ButtonMode.DOUBLE
if (this.immediate) mode += ButtonMode.IMMEDIATE
if (this.long) mode += ButtonMode.LONG
if (this.sticky) mode += ButtonMode.STICKY
if (this.hold || this.double) {
if (this.immediate) mode += ButtonMode.IMMEDIATE
if (this.long) mode += ButtonMode.LONG
}
if (this.sticky) mode = ButtonMode.STICKY
if (mode === 0) mode = ButtonMode.NORMAL
return mode
}
Expand Down

0 comments on commit fd3a689

Please sign in to comment.