Cleaned up byte parsing for TextInputEvents to be more readable.