Assemble with magnets, power through said magnets, comms over power or encrypted BTLE. Or powered with a cr2032 and BTLE encrypted HID comms.
I thought about magnets, littleBits does this, see their
bitsnaps.
But I don't know if this is stable enough. Maybe it is better to use standard pin headers? And squares instead of hexagons? Then it could be arranged in both ways, staggered like a normal keyboard, or ortholinear in a matrix. An idea, bottom side:
The keys would have pin header receptacles and then you could connect it with small lego-like bricks (I need to improve the design, so that there are pockets around the receptacles and the bricks are planar with the bottom of the keys when plugged in). To make it easy, I need 4 connections from one key to another: VCC, GND, serial send, and serial receive.
Problem with this construction is that it results in relatively big keys, because the pin headers have to be in the center of the right and left side, on each of the 4 sides. With hexagonal keys it would be staggered by default, but you could make it ortholinear, if you add a row of dummy elements. Then it could be smaller, too, because I need only one 4-pin-header-connection on each of the 6 sides.