And for the record, keyboards have massive size difference, in all dimensions. Keyboards actually have a way bigger variance then you'd find in phones.
Some are just a few mm high, others go as high as 5cm. There are 60% keyboards. Ergonomic keyboards. Keyboards that're basically just a small nipple with which you're doing input by gesture.
the keys and actuation themselves are another topic with Rubberdome on cheap and trashy keyboards, mechanical with springs and other techniques, even some optical - though they're pretty gimmicky.
There are stylized key caps off all kinds, including some really cringe material like ahego keys from a few years ago. And actually quite pretty one's with mountains, clouds and areas stylized under resin [1]
Some are so small you can only use them with your thumbs
[1] random example https://www.etsy.com/de/listing/1289117693/mountain-creeks-s...