You could, though you'd probably be better multiplexing then instead. (Consider the resistor selection to minimise aliasing if multiple keys pressed, and the decoding or error handling.)
I remember using a MM74C923 20-key encoder (else MM74C922 for 16 keys) rather than bogging down the CPU.
Mind you, I was only running a dual 6502 (Apple CPU) - aka 6511 (4MHz?), though I'd probably do the same for an 68HC11 or 68HC12 (primitive digital CPUs; less than 17 bit data).