''CTRL + X' not working on mac to save and exit nano

I am running the command below on my mac to add directories to PATH,

sudo nano /etc/paths

In the opened nano text window, after adding all the paths, CTRL+X doesn't work to save and exit nano. tried CTRL+SHIFT+X which also doesn't work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source