That works with all macOS versions like High Sierra, Sierra, El Capitan, etc. Hitting the keystroke a second time will exit full screen mode. Hitting that keystroke will immediately enter full screen mode.
In MacOS, you can toggle into Full Screen Mode on any app that supports the feature (which is most by now) by using the following keystroke: Mac Keyboard Shortcut for Full Screen Mode: Control + Command + F The tutorial here will demonstrate the keyboard shortcut for toggling in and out of full screen mode on MacOS and Mac OS X, as well as show you how to setup a keystroke for this capability in earlier versions of Mac system software.