The five keys must be ordered as two keys group then three keys group, not the other way around.

Usually, manufacturers create keyboards with standard keys count starting at 88 keys (the grand piano has 88 keys), 76 keys, 61 keys, 49 keys, 24 keys and finally, sometimes even 12 keys[4] X Research source

88 Keys: 23 keys (Middle-C is the 24th white key) You can also find the group of five black keys easier as the fourth group of 5 black keys, then use the method above. 76 Keys: 19 keys (Middle-C is the 20th white key) The third group of 5 black keys (there usually is a group of three black keys at the left side at first, don’t count those) 61 Keys: 14 keys (Middle-C is the 15th white key) The third group of five black keys. 49 Keys: 14 keys (Middle-C is the 15th white key) The third group of five black keys. 24 Keys, 25 Keys: 7 keys (Middle-C is the 8th white key) Second group of 5 black keys Other non standard sizes: use the standard method mentioned earlier in this article