14

I tried to enable the developer console in the options menu in Portal 2, but it doesn't work out of the box because I'm using a German keyboard and the ~ key is not recognized.

I tried to edit the config.cfg and replace the keybinding from ` to \, but my changes are reset when I start Portal 2 again. How can I permanently change the keybinding for the developer console?

Timmy Jim
  • 54,489
  • 32
  • 188
  • 251
Mad Scientist
  • 65,578
  • 180
  • 399
  • 591

2 Answers2

16

Do the following, just tested, steps:

  1. Add the parameter -console to Launch Settings of Portal 2.
  2. Launch Portal 2 (developer console should be already there).
  3. Write and execute in console: bind f11 toggleconsole
  4. Test that pressing F11 toggles the console.
  5. Now exit Portal 2 and relaunch it. Everything should work as expected.
chicks
  • 1,309
  • 2
  • 17
  • 31
Drake
  • 42,435
  • 85
  • 238
  • 412
  • 3
    u must to write "" for the button u want to use for console and for the command of the button. in this case "F11" "toggleconsole" try now and u have your console when u want =) sorry for my english, i'm italian. –  Jun 05 '11 at 22:52
0

Create autoexec.cfg in your cfg folder, with the contents:

bind \ toggleconsole

If this file does not automatically execute, try putting +exec autoexec.cfg in your launch options.

qpingu
  • 715
  • 4
  • 8
  • Unfortunately that didn't work. I noticed that the config.cfg has the command unbindall at the very beginning, depending on the order the files are loaded that might reset my changes in the autoexec.cfg – Mad Scientist Apr 21 '11 at 16:58
  • You can however put the bind command in the config.cfg though. It's not recommended but it is possible. – Weegee Apr 21 '11 at 17:14