AlpakkaManualGalleryComponents

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:

NORMALActions triggeredActions released
Primary actionsWhen the button is pressedWhen the button is released
Secondary actions--
HOLD_EXCLUSIVE
HOLD_EXCLUSIVE_LONG
Actions triggeredActions released
Primary actionsWhen the button is released before the time thresholdImmediately
Secondary actionsWhen the button is pressed for longer than the time thresholdWhen the button is released
HOLD_OVERLAP
HOLD_OVERLAP_LONG
Actions triggeredActions released
Primary actionsWhen the button is pressedWhen the button is released
Secondary actionsWhen the button is pressed for longer than the time thresholdWhen the button is released
HOLD_DOUBLE_PRESS
(eg: Home button)
Actions triggeredActions released
Primary actionsWhen the button is pressed only once within the time thresholdWhen the button is released
Secondary actionsWhen the button is pressed twice within the time thresholdWhen the button is released
STICKY
(eg: Alt-tabbing)
Actions triggeredActions released
Primary actionsWhen the button is pressedWhen the profile is changed
Secondary actionsWhen the button is pressedWhen 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