You know, Halo1_CE has a code interface for the game's input objects...

you may want to consult those before remaking this wheel