Console key

  • ClaymoreTF2
    1st Aug 2012 Member 0 Permalink

    My keyboard have broken tilde key. Is there any way to change console key?

  • DoctorWhooves
    1st Aug 2012 Member 0 Permalink

    I think you can change the keybinding, from the console ... >_<

    EDIT:

    if your on windows try going into the start menu and typing "osk" then press enter. It'll bring up a virtual keyboard.

  • jacob1
    1st Aug 2012 Developer 0 Permalink
    Save this script as/in autorun.lua, and then press "/" to open the console.

    function keypress(keychar,keynum,modifier,event)
    if keynum==47 then tpt.set_console(1) end
    end
    tpt.register_keypress(keypress)
  • boxmein
    1st Aug 2012 Former Staff 0 Permalink
    @DoctorWhooves (View Post)
    You can't change the key binding.
    @jacob1 (View Post)
    Would it only toggle ON? This should help...

    local toggled = 0
    function keypress(keychar,keynum,modifier,event)
    if keynum==47 then
    if toggled == 0 then
    toggled = 1
    else
    toggled = 0
    end
    tpt.set_console(toggled) end
    end
    tpt.register_keypress(keypress)
  • Pilihp64
    1st Aug 2012 Developer 0 Permalink

    @boxmein (View Post)

    Scripts don't run inside the console, so toggling off is impossible.  But the ESC key always closes it, lets just hope that key doesn't break.

  • jacob1
    1st Aug 2012 Developer 0 Permalink
    Yes, and you can also hit the "X" in the top right to exit out.
  • boxmein
    1st Aug 2012 Former Staff 0 Permalink
    @cracker64 (View Post)
    Makes sense.
    @jacob1 (View Post)
    The stacked [X] button is actually quite annoying. It's like the only program I know that uses such features.
  • jacob1
    1st Aug 2012 Developer 0 Permalink
    @boxmein (View Post)
    I actually like it, I usually hit [X] to exit out of things. tpt++ won't have those though, hitting it once closes the whole program. It would be easy to make hitting it act like in tpt++, I'll add an option to my mod.