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!

