Important: The console text box will be invisible. Just type the cheat code and press Enter. If the cheat does not work, you likely misspelled something. Just try again.
PC: To enable cheats on PC, open the file swkotor2.ini, which is located in the game's main folder. This is usually in C:\[your game directory]\Steam\steamapps\common\Knights of the Old Republic II Under [Game Options] add the code EnableCheats=1, and save.
To enter cheats in the game, press the ` / ~ key, which is usually located in the top left corner of the keyboard under the F1 key. Type the cheat, and then press the Enter key.
Mac: Open Finder, and select Go from the menu. Select Go to folder. Type ~/Library/Application Support. Find the Knights of the Old Republic II folder. This is not the Steam folder. The game will have its own separate folder. You should see the swkotor2.ini file. Open it with TextEdit abd type EnableCheats=1 under [Game Options]. Save the file.
Note that "Cheat Used" will be displayed on all screenshots once you enter a cheat code.