How to close a file in IntelliJ IDEA using a keyboard shortcut? July 11, 2023 by Tarik Idiot me. CMD–F4 or, as mentioned before, CTRL–F4. Thank you all. I’ll just bury myself now 🙂