A keyboard needs a controller. When you buy a standalone keyboard, the controller is on a circuit board inside the case. With laptop keyboards, the controller is usually on the laptop's motherboard.
Each keyboard has a "matrix", which is like a map between keys and signals. Every keyboard type has its own matrix, and every controller is built for one particular matrix or a few variations of a matrix.
Therefore, you can not just use any controller. You need to make your own controller, which is easier said than done. You need to figure out the matrix and program the controller with the matrix. Then also build the support circuitry for interfacing your keyboard with the matrix.
Only very few members here have done it, and I think that they are all engineers. I suggest that you start by reading up on these things in the Modifications forum on this site. There is a lot to learn.