How do you use cheats in Hearts of Iron 4?
To bring up the cheat console, press and hold the CTRL and ~ (TILDE, THE KEY ABOVE TAB) keys until the prompt appears. From there, you can enter the codes indicated below for the corresponding effects. set_country_flag  – Add a country flag to currently played nation.
How do I enable console commands in HOI4?How to Open the Console. Opening the console in HOI4 is as simple as pressing a hotkey. The most commonly available hotkey is `, simply press this key and the console should open up - it is usually positioned in the top left of your keyboard, under the ESC key.