Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware

This commit is contained in:
László Monda
2017-07-26 13:35:39 +02:00

View File

@@ -28,15 +28,15 @@ static parser_error_t parseKeyStrokeAction(key_action_t *keyAction, uint8_t keyS
default: default:
return ParserError_InvalidSerializedKeystrokeType; return ParserError_InvalidSerializedKeystrokeType;
} }
if (keyStrokeAction & SERIALIZED_KEYSTROKE_TYPE_MASK_HAS_SCANCODE) { keyAction->keystroke.scancode = keyStrokeAction & SERIALIZED_KEYSTROKE_TYPE_MASK_HAS_SCANCODE
keyAction->keystroke.scancode = keystrokeType == SerializedKeystrokeType_LongMedia ? readUInt16(buffer) : readUInt8(buffer); ? keystrokeType == SerializedKeystrokeType_LongMedia ? readUInt16(buffer) : readUInt8(buffer)
} : 0;
if (keyStrokeAction & SERIALIZED_KEYSTROKE_TYPE_MASK_HAS_MODIFIERS) { keyAction->keystroke.modifiers = keyStrokeAction & SERIALIZED_KEYSTROKE_TYPE_MASK_HAS_MODIFIERS
keyAction->keystroke.modifiers = readUInt8(buffer); ? readUInt8(buffer)
} : 0;
if (keyStrokeAction & SERIALIZED_KEYSTROKE_TYPE_MASK_HAS_LONGPRESS) { keyAction->keystroke.longPressAction = keyStrokeAction & SERIALIZED_KEYSTROKE_TYPE_MASK_HAS_LONGPRESS
keyAction->keystroke.longPressAction = readUInt8(buffer); ? readUInt8(buffer)
} : 0;
return ParserError_Success; return ParserError_Success;
} }