Have your cheat list stored with expected behaviors
The GTA Hidden way
When a key is pressed start a cheat-listener function
func is_cheating():
Check if another key is pressed within a certain time
else ignore and consider it as movement key
If another key is pressed within expected time frame
compare a concatenated String or Unicode to entries
in your stored cheat list
if cheat is stored in list
call cheat function with expected behavior
The Console/Promo-Code way
Have an input field for the code
when enter/accept pressed compare to stored code list
execute expected behavior