The MM74C922 is a 16-key encoder that I've been using in my Arduino project, but now it's getting more and more expensive (because it's getting discontinued).

for instead it,usually uses software keybord scanning. but i'm poor at programming, using for loop just like someone kill me. so i want to build a hardware keybord encoder, then programming won't kill me.