X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=NJOutputKeyPress.m;h=622cf41083d21d58195099567e0e5d81c777459d;hp=5371475bba11c97af2619c9f5a85efc9f6f6a603;hb=844a57be52a2e243832e3d83d148fa3cea6d5ad1;hpb=6044e47a97de33531c47cd209b30d4405aa0530a diff --git a/NJOutputKeyPress.m b/NJOutputKeyPress.m index 5371475..622cf41 100644 --- a/NJOutputKeyPress.m +++ b/NJOutputKeyPress.m @@ -16,7 +16,9 @@ } - (NSDictionary *)serialize { - return @{ @"type": @"key press", @"key": @(_vk) }; + return _vk != NJKeyInputFieldEmpty + ? @{ @"type": self.class.serializationCode, @"key": @(_vk) } + : nil; } + (NJOutput *)outputDeserialize:(NSDictionary *)serialization