Frequency wise there is nothing like flat or sharp notes, Half key away or full key away.
12 note scale commonly used in keyboard is called *equal tempered scale* which has notes standardised from A (440KHz) to G(830.6 KHz) where each note is 1.059463 times previous note (2^1/12). This is to make every next octave come at double frequency. C5, First note of C Major scale is third from the standard A. relationship multiple is still same.
This also provides us a way to avoid harmonics of a note clashing with other note so that human ear can distinguish them easily and sweetly. Historically many scientists have contributed to this standardisation including Pythagoras.
The 7-5 keyboard grouping was most practical combination after trying to do experimentation with 8-6, 6-6 and other linear combination. Declaring sharp and flat notes is actually an after thought and not half note away or full note away etc. As per modern definition c-sharp is same as d-flat. The concept of E-F being immediate has come as adjustment as old 7 notes in traditional system had to be fitted to
12 note well defined system. In fact 19 note, 22 note and 39 note system also exist.
Continuous play electronic keyboards are next in-thing.