# If statement

**If statement node is one of the most used and useful node we need. It allows to alter the flow based on a boolean input, allowing to execute different actions based on the results.**

### Examples with keyboard input:

<figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FN60C98buf7WAsUnFGBGM%2Fimage.png?alt=media&#x26;token=39d397f6-34f2-403d-ae98-e9c8a14fd14c" alt=""><figcaption><p>If G is pressed continue the flow, else do nothing</p></figcaption></figure>

<figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FBQnKR2M0H9dXKc0fWBp8%2Fimage.png?alt=media&#x26;token=d9b9b660-2dfd-4919-bb69-2f426b9b6e8b" alt=""><figcaption><p>If F6 is pressed call <em><strong>InitNew</strong></em> else listen for the E keypress</p></figcaption></figure>
