Modern keyboard controller
As mentioned in the comments, most modern consumer keyboards have specialized/integrated microcontrollers.   If you just want to make your own keyboard you should use a 10x11 keyboard matrix to have at most 110 keys (101 keys is the standard for US keyboards, 104 for windows keyboards).   So you would need at least 21 IO pins.

Here are 12,390 microcontrollers that you can choose from that all have USB capability and all have >= 21 pins:

https://www.digikey.com/products/en/integrated-circuits-ics/embedded-microcontrollers/685?k=usb+microcontrollers&amp;k=&amp;pkeyword=usb+microcontrollers&amp;imin2208=21&amp;FV=ffe002ad&amp;mnonly=0&amp;ColumnSort=0&amp;page=1&amp;quantity=0&amp;ptm=0&amp;fid=0&amp;pageSize=25

A 32u4 has 20 IO pins and USB connectivity so you might just want to choose that if you are ok with having at most 100 keys.