From Frank Adams on Hackster.io:
Laptop Keyboard Conversion to USB
I made a “nearly universal” USB controller using a Teensy LC or 3.2 on an FPC connector board that will work with most laptop keyboards.
I did this project because I’ve seen many forum posts from people asking how to use the keyboard from their old broken laptop. Unfortunately the answers given are “it can’t be done,” “it’s too hard,” or “rip apart another USB keyboard and steal the controller circuit.” I believe I have a better answer by using a “nearly universal” keyboard controller based on a Teensy LC or 3.2 mounted on an FPC connector board. This board accepts keyboard cables with up to 34 pins on a 1 mm or 0.8 mm pitch. The board shown below won’t work on every keyboard but it will work on most.