No.
You can use 1 byte per key (storing the current state in 1 bit, the previous state in 1 bit and the repetition count in 6 bits if you need it). If you want to support every
Virtual Key Windows presents you can use a 256 bytes array. 256 octets is nothing to worry about.