Skip to content

Commit

Permalink
Merge pull request #28 from Xelus22/button_test
Browse files Browse the repository at this point in the history
  • Loading branch information
olivia authored Sep 29, 2023
2 parents 9e779e2 + 49db252 commit 33d962e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/menu-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ type CommandDef = [string, number, number];

// VIA controls
type NumNumArray = number | number[]; // needed to shoehorn wtrgb enable caps/hhkb/etc lighting for now

export type Button = {
type: 'button';
options?: [number];
};

export type Toggle = {
type: 'toggle';
options?: [NumNumArray, NumNumArray];
Expand Down Expand Up @@ -65,7 +71,7 @@ export type ColorPalette = {

// An atomic unit that represents a renderable unit - usually a Control
type Item<A> = Label & Conditional & ByteLength & A;
type Control = Keycode | Color | Toggle | Dropdown | Range;
type Control = Keycode | Color | Toggle | Dropdown | Range | Button;
type UniqueControl = ColorPalette;
// The standard VIA control
export type VIAControlItem = Control & Item<BindableContent>;
Expand Down

0 comments on commit 33d962e

Please sign in to comment.