Edit the Ingame Keybinding Screen

Conveniently bind custom commands just like the default ones.

While investigating Gleca's Mod, I discovered their method of editing the keybinds page. I've been wanting to know how to do this, since binding every custom key with the "bind" command in console was less than optimal. This method really helps with commands you tend to want bound to a key (like custom radials).

Turns out, editing this is almost mind-blowingly easy (assuming you know the basics of making a vpk mod). Here's a brief look, for those who would like to do the same.

---------------------------------------------

I'm going to do this by vpk, since it's easiest. So make a root folder and call it "Custom Keybinds" (or whatever the heck you want to call it)

In this root folder, make the usual addoninfo.txt and fill it out appropriately. If you don't know how to do so, here's a tutorial.

Next, in the root folder, make a "scripts" folder, and go into it.

In here, we're going to make the appropriate files.

The file we need to edit is a .LST file, but this is editable in Notepad/other authoring program just like any txt file would be. I'll assume you use notepad, if you don't then you should still be fairly familiar with what I'm about to describe.

Open notepad and copy in the following default configuration:

"blank"         "=========================="
"blank"         "#Valve_Movement_Title"
"blank"         "=========================="
"+forward"              "#Valve_Move_Forward"
"+back"                 "#Valve_Move_Back"
"+moveleft"             "#Valve_Move_Left"
"+moveright"            "#Valve_Move_Right"
"+speed"                "#L4D_Walk"
"+jump"                 "#Valve_Jump"
"+duck"                 "#Valve_Duck"
"blank"         "=========================="
"blank"         "#Cstrike_Combat_Title"
"blank"         "=========================="
"+attack"               "#Cstrike_Fire"
"+attack2"              "#L4D_melee_ability"
"+zoom"                 "#L4D_zoom"
"+reload"               "#Valve_Reload_Weapon"
"invprev"               "#Valve_Previous_Weapon"
"invnext"               "#Valve_Next_Weapon"
"lastinv"               "#Valve_Last_Weapon_Used"
"blank"         "=========================="
"blank"         "#Valve_Communication_Title"
"blank"         "=========================="
"+voicerecord"          "#Valve_Use_Voice_Communication"
"Vote Yes"              "#L4D_vote_yes"
"Vote No"               "#L4D_vote_no"
"+mouse_menu Orders"    "#L4D_orders"
"+mouse_menu QA"        "#L4D_questions"
"messagemode"           "#Valve_Chat_Message"
"messagemode2"          "#Valve_Team_Message"
"blank"         "=========================="
"blank"         "#Cstrike_Menu_Title"
"blank"         "=========================="
"chooseteam"            "#Cstrike_Select_Team"
"+showscores"           "#Valve_Display_Scores"
"slot1"                 "#L4D360UI_Controller_Primary"
"slot2"                 "#L4D360UI_Controller_Secondary"
"slot3"                 "#L4D360UI_Controller_Grenade"
"slot4"                 "#L4D360UI_Controller_Healthpack"
"slot5"                 "#L4D360UI_Controller_Pills"
"motd"                  "#L4D_MOTD"
"blank"         "=========================="
"blank"         "#Valve_Miscellaneous_Title"
"blank"         "=========================="
"+use"                  "#Valve_Use_Items"
"impulse 100"           "#Valve_Flashlight"
"impulse 201"           "#Valve_Spray_Logo"
"jpeg"                  "#Valve_Take_Screen_Shot"
"quit"                  "#Valve_Quit_Game"
"blank"         "=========================="
"blank"         "CUSTOM KEY BINDS"
"blank"         "=========================="
"disconnect"            "Disconnect from the current server"

As you can see, it's not too terribly complex. On each line, you first type the command in quotes, followed by some spaces (the amount doesn't matter, feel free to add as many needed to keep things nice and tidily lined up), and then the command description in quotes. For example:

"kill" "Kill yourself."

Ingame, this would let you bind a key to the command 'kill' (which targets yourself if no target is specified). The description "Kill Yourself." will show on the keybinding screen to help you know what you're binding the key to.

Also note the way new sections are added:

"blank"         "=========================="
"blank"         "CUSTOM KEY BINDS"
"blank"         "=========================="

You can make more sections if you want. Organize your commands into groups, maybe.

After setting things up properly, save the file as "kb_act.lst"

You MUST HAVE the quotes, or it'll save the file as a txt, which wouldn't work out!

That should be enough for now. Make your root folder into a VPK and add it to your addons folder, open the game, and take a look into your keybinding screen!

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • Alex_Lee's Levels
    • P1: Beggar
      Points: 111
    • C1: Member
    • A2: Tenderfoot
      Account Age: 8 months
    Posted 3 months ago

    Useful

    Bananite

Credits

Submitter
Qwazzy's Levels
  • P1: Beggar
    Points: 126
  • C1: Member
  • A3: Apprentice
    Account Age: 1 year
Qwazzy (Creator/Co-creator)
Key Authors
Qwazzy
Tutorial Writer
Gleca
Their Mod as an Example

Rating

?/10
Not yet rated.

Additional Info

Genre
Coding/Scripting
Difficulty Level
Intermediate

Stats

Post Count
1
ViewCount
1,876
Date Added
10 months ago
Date Modified
10 months ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share