'How to detect arrow keys in MIPS?

I'd like to read which arrow keys are pressed on the keyboard, to use them as controls for a game. I found related questions, to read a character (MIPS with Mars sim. - how to read a value from a keyboard input automatically (i.e. - no pressing enter to get the value)) or to do exactly what I need to do in x86 (How to detect arrow keys in 16-bit DOS code), but I'm still a bit confused on how to implement it in MIPS.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source