AlpakkaManualGalleryComponents
Alpakka manual
DIY & Hardware
Config
Profiles
Developer
PCB development (soon)
Case mods (soon)
Other
Modify profiles
We are working in a simple method to modify profile on the Ctrl app, without the need to recompile the firmware, but at the moment the only way to edit profiles is to change the source code.
Meanwhile profiles are just C code located in the profiles/ folder, each profile in a single file containing a Profile object. And the profile having its buttons defined, a Button object for each button.
The parameters of the Button object are:
- The pin identifier of the physical button.
- The desired behavior of the button. (See below).
- A list of actions to be performed, grouped with the ACTIONS macro for convenience.
Actions are either keyboard keys, mouse buttons, gamepad buttons, or special functions (procedures).
Button modesΒΆ
Depending on the mode there may be primary and secondary actions. The possible behaviors are:
NORMAL | Actions triggered | Actions released |
---|---|---|
Primary actions | When the button is pressed | When the button is released |
Secondary actions | - | - |
HOLD_EXCLUSIVE HOLD_EXCLUSIVE_LONG | Actions triggered | Actions released |
---|---|---|
Primary actions | When the button is released before the time threshold | Immediately |
Secondary actions | When the button is pressed for longer than the time threshold | When the button is released |
HOLD_OVERLAP HOLD_OVERLAP_LONG | Actions triggered | Actions released |
---|---|---|
Primary actions | When the button is pressed | When the button is released |
Secondary actions | When the button is pressed for longer than the time threshold | When the button is released |
HOLD_DOUBLE_PRESS (eg: Home button) | Actions triggered | Actions released |
---|---|---|
Primary actions | When the button is pressed only once within the time threshold | When the button is released |
Secondary actions | When the button is pressed twice within the time threshold | When the button is released |
STICKY (eg: Alt-tabbing) | Actions triggered | Actions released |
---|---|---|
Primary actions | When the button is pressed | When the profile is changed |
Secondary actions | When the button is pressed | When the button is released |
Behavior timing
Also for now, Button behavior time thresholds are defined as config constants:
- CFG_PRESS_DEBOUNCE
- CFG_DOUBLE_PRESS
- CFG_HOLD_EXCLUSIVE_TIME
- CFG_HOLD_EXCLUSIVE_LONG_TIME
- CFG_HOLD_OVERLAP_TIME