Simply type the code using your keyboard while you are actively playing the game. You do not need to press "Enter" or "Tilde" (~) first.