WSAD to move Q and E to shoot the blue and red portal (respectively). If there is only one portal open, you'll bounce (there's no place to come out) There is a barrier in level 6 (last level) that closes all your portals when you pass through it.
Thanks to Scratch Team for software that made the creation of this possible. Based of Portal by Valve. Thanks to Musescore for the software I used to write the music.