setPrefixFromKeys method
Future<CommandResponse>
setPrefixFromKeys({
- required dynamic deviceId,
- required List<
DirectInputKey> keys, - FormattableSymbology symbology = FormattableSymbology.allCodes,
Sets the prefix formatting using a list of DirectInputKey.
deviceId
- The identifier of the target device.
keys
- A list of DirectInputKey values to be used for the prefix, with a maximum length of 4.
Returns a CommandResponse indicating the success or failure of the operation.
Implementation
Future<CommandResponse> setPrefixFromKeys(
{required deviceId,
required List<DirectInputKey> keys,
FormattableSymbology symbology = FormattableSymbology.allCodes}) async {
final directInputKeysCodes =
_getDirectInputKeysCodes(keys, _maxPrefixChars);
return sendCommand(deviceId, _prefixSymbologyCodesMap[symbology]!,
parameters: directInputKeysCodes);
}