setPreambleFromKeys method

Future<CommandResponse> setPreambleFromKeys({
  1. required dynamic deviceId,
  2. required List<DirectInputKey> keys,
})

Sets the preamble formatting using a list of DirectInputKey.

deviceId - The identifier of the target device. keys - A list of DirectInputKey values to be used for the preamble, with a maximum length of 8.

Returns a CommandResponse indicating the success or failure of the operation.

Implementation

Future<CommandResponse> setPreambleFromKeys(
    {required deviceId, required List<DirectInputKey> keys}) async {
  final directInputKeysCodes =
      _getDirectInputKeysCodes(keys, _maxPreambleChars);
  return sendCommand(deviceId, preamble, parameters: directInputKeysCodes);
}