This array is read-only from outside of this class! Always Characters[#0] = false.
Note that since a given character may be generated by various key combinations, this doesn't work as reliably as Keys array. For example, consider pressing a, then shift, then releasing a — for a short time character 'A', and not 'a', should be pressed.
Although we do our best (have some mapping tables to track characters), and in practice this works Ok. But still checking for keys on Keys array, when possible, is advised.
Call when key is pressed. Pass TKey, and corresponding character (Char).
Pass Key = K_None if this is not representable as TKey, pass CharKey = #0 if this is not representable as char. But never pass both Key = K_None and CharKey = #0 (this would have no meaning).
procedure KeyUp(const Key: TKey; out CharKey: char);
Call when key is released. Never pass Key = K_None here.
It returns which character was released as a consequence of this key release.
procedure Clear;
Mark all keys as released. That is, this sets all Keys and Characters items to False. Also resets internal arrays used to track Characters from KeyDown and KeyUp.
Returns the same values as are in the Keys table. Although this is more comfortable: it's a default property of this class, so you can write simply KeysPressed[K_X] instead of KeysPressed.Keys[K_X].