For code 1, you must go into a level enter code, and close whatever button you then press F11 . For code 2, you can do it in anywhere. You can also change the value up or down, depending on the gravity you want. It may not work on the newest keyboards, so use an older one, if possible. Press F10/Button below escape to open a dialogue box. Type in code and go for it! Also, if done in level, a pause is recommended.
If you find yourself unable to complete a level, you are able to unlock the level that comes after that by navigating to that locked level and using your mouse to click in the bottom right corner of the screen. If done correctly the "not qualified" level will become instantly unlocked. It should be noted that you CAN repeat this process until every level in the game is unlocked.