A piano keyboard, or MIDI keyboard as is often the case, is broken up into two sets of keys:
- C-E: Distinguished by two black keys. Contains C, C#, D, D#, and E.
- F-B: Distinguished by three black keys. Contains F, F#, G, G#, A, A#, and B.
The obvious question is: "What the hell?"
It's simple: imagine how these keys were meant to be used. A pianist would have a sheet of music in front of them, and they would sight read it as they played. This would be very difficult if they couldn't find the keys without looking at them!
Plus, you'd need almost twice the length for the same number of keys, and there's no way even a pianist with ridiculously-long arms would be able to reach them all.
This is not all that different from the keyboard on your laptop. I wrote this whole thing without even glancing at the keyboard because the keys are arranged a certain way. Most newer keyboards have eschewed gaps between function keys (the Fs with numbers up top). As someone who uses function keys a lot, this is a problem!
So that's why they're arranged like this. If they were arranged from C0 to Cwhatever, like the function keys on my wonderful new laptop, you'd never be able to find them without looking. And in the case of piano keys, looking wouldn't even help since they aren't labeled!
Even if you input everything with a piano roll, I highly recommend memorizing all the keys. The groups are the same across the board, so you only have to memorize 12 keys--one octave. It helps so much with composing to be able to know what note you're on, even if you have pitch labels turned on.