After seeing Half-Life 2 being played with the Portal Gun by importing the maps into Portal's map folder, I wanted to do it myself. I got the maps to work properly, but when I use "impulse 101" to get the Portal Gun and HL2 weapons, I'm unable to switch weapons by using the 1, 2, 3, 4, etc. buttons, except for the weapon categories that have the shotgun or grenade/RPG/Bugbait in them. If I want to use weapons like the Portal Gun, Gravity Gun, or the crowbar, I have to use console commands. Is there a way to get weapon switching to work?

  • 1
    I guess you might have to then bind those keys to some console commands that put a certain weapon straight into your hands. Nov 1, 2013 at 22:31
  • If I try to do that, it just tells me how to use the bind command instead of of binding things. I typed in "bind p use weapon_portalgun" and it just says "bind <key> <command>"
    – Julum-Ei
    Nov 1, 2013 at 23:53
  • You probably need to use double quotes for the command, like so: bind p "use weapon_portalgun" Nov 2, 2013 at 3:24
  • Doesn't the mousewheel work? I remember playing HL2 with the portal gun before, but I didn't have any trouble switching weapons.
    – Nolonar
    Nov 2, 2013 at 13:26
  • The mousewheel does not work. Oh, and I'm also having a problem where the subtitles for dialogue work, but nobody actually says anything, and I'm stuck at Kleiner's lab because I can't pick up the HEV Suit.
    – Julum-Ei
    Nov 2, 2013 at 13:34

2 Answers 2


I believe Portal does not allow buttons 1-0 on the keyboard to work since there are only 2 weapons in the whole game (single/dual portal gun) and you are not meant to switch between them.

  • 2
    It's actually one weapon - which portals you can fire are controlled in the entity. There is a way to only fire the orange portal - but it requires making a map. May 10, 2015 at 2:06

1-0 do work in Portal, however, they're not bound to anything, so pressing them does nothing. The commands still exist, though, so they can be bound to the proper keys.

Note that this only works in the original Portal, as Portal 2 lacks the programming for all of Half-Life 2's entities.

First, make sure your developer's console is enabled. Press the key to open it (usually `), and type these commands:
sv_cheats 1
This enables cheats, which we'll need for some of the following commands.
impulse 101
This gives you all the weapons and the suit.
give weapon_portalgun
This gives you only the portal gun, if you want to acquire all the other weapons on your own.
The portal gun only fires blue portals after you use give. This will allow you to fire both portals.
bind 1 "slot1"
Binds the 1 key to slot1, the command that activates the 1st slot (crowbar, etc.) Continue with bind 2 "slot2", etc. until you reach 9, although it should only need 1-6 (since the other slots aren't used.)

If you do use impulse 101, keep in mind you won't be able to pick up the suit, as you already have it.

If you didn't use it, then you should be able to pick it up normally. If for some reason you can't, type:
give item_suit
and you should have it afterwards.

These let you use HL2's special commands in Portal:
bind g "phys_swap"
This allows you to swap from your weapon to the grav-gun, or vice-versa.
bind q "lastinv"
Swap between the weapon you're holding and the last one you held.
bind c "impulse 50"
This allows you to call/deploy your squad.
bind z "+zoom"
Allows you to use the suit's zoom feature.

(These can be set through Portal's settings menu.)
bind F6 "save_quick"
This allows you to save without by pressing F6.
bind F9 "load_quick"
Likewise, quick-loads your last quick-save.
map d1_trainstation_01
This loads the first level of the game.

(These are if you want to take videos or pictures. If you don't want to, skip over this part.)
bind F5 "jpeg"
A screenshot, usually auto-bound. Just in case you want to take awesome HL2-portalgun pictures.
record foo
Records a demo file (Source's videos) called 'foo'.
Stops a demo file that's recording.
Demo UI, to watch demos.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .