Here's How To Change The Hotkeys In Vhe

JedediahJedediah Join Date: 2003-01-27 Member: 12847Members
Everyone is always asking for this.. it's pretty simple actually

1. Download Resource Hacker at <a href='http://www.users.on.net/johnson/resourcehacker/' target='_blank'>http://www.users.on.net/johnson/resourcehacker/</a>

2. Open hammer.exe in RH (you might want to backup hammer.exe first)

3. Expand "Accelerators" group and any of the 3 numbered folders therein. "129" contains most of the useful hotkeys

4. Click on the "1033" entry and edit the accelerator entries as you see fit. The first field of each line is the key to use. The second field is the ID of the function to perform (don't change this field). The fourth field is the modifier (i.e. SHIFT, CONTROL, ALT). To make an accelerator with NO modifier, remove the fourth field completely.. for example:

<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
VK_A, 32913, NOINVERT, VIRTKEY
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

... binds "A" to texture application.

5. When finished, click "Compile Script" and then File->Save

That's it. I just tried it and it seems to work perfectly. If someone feels so inclined, a little GUI application could easily be made to make this editing easier.

Here is my "Accelerators/129/1033" script. It changes most of the SHIFT-<i>key</i> hotkeys to just plain <i>key</i>. It also changes ALT-ENTER (object properties) to the "/" key.

<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
129 ACCELERATORS
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
VK_A, 32824, NOINVERT, CONTROL, VIRTKEY
VK_A, 32879, NOINVERT, ALT, VIRTKEY
VK_A, 32913, NOINVERT, VIRTKEY
VK_B, 32947, NOINVERT, CONTROL, VIRTKEY
VK_B, 33025, NOINVERT, ALT, VIRTKEY
VK_B, 32812, NOINVERT, VIRTKEY
VK_C, 32942, NOINVERT, CONTROL, VIRTKEY
VK_C, 32899, NOINVERT, ALT, VIRTKEY
VK_C, 32833, NOINVERT, VIRTKEY
VK_C, 32868, NOINVERT, CONTROL, SHIFT, VIRTKEY
VK_C, 1219, NOINVERT, ALT, SHIFT, VIRTKEY
VK_D, 33008, NOINVERT, VIRTKEY
VK_E, 32918, NOINVERT, CONTROL, VIRTKEY
VK_E, 32995, NOINVERT, ALT, VIRTKEY
VK_E, 32816, NOINVERT, VIRTKEY
VK_F, 32954, NOINVERT, CONTROL, VIRTKEY
VK_G, 32871, NOINVERT, CONTROL, VIRTKEY
VK_G, 32829, NOINVERT, VIRTKEY
VK_G, 33061, NOINVERT, CONTROL, SHIFT, VIRTKEY
VK_H, 32920, NOINVERT, CONTROL, VIRTKEY
VK_I, 32936, NOINVERT, CONTROL, VIRTKEY
VK_L, 32935, NOINVERT, CONTROL, VIRTKEY
VK_L, 32956, NOINVERT, VIRTKEY
VK_M, 113, NOINVERT, CONTROL, VIRTKEY
VK_N, 57600, NOINVERT, CONTROL, VIRTKEY
VK_O, 57601, NOINVERT, CONTROL, VIRTKEY
VK_P, 57607, NOINVERT, CONTROL, VIRTKEY
VK_P, 32930, NOINVERT, ALT, VIRTKEY
VK_P, 32966, NOINVERT, VIRTKEY
VK_Q, 32865, NOINVERT, VIRTKEY
VK_R, 32933, NOINVERT, CONTROL, VIRTKEY
VK_R, 32796, NOINVERT, VIRTKEY
VK_S, 57603, NOINVERT, CONTROL, VIRTKEY
VK_S, 32880, NOINVERT, ALT, VIRTKEY
VK_S, 32813, NOINVERT, VIRTKEY
VK_T, 1110, NOINVERT, CONTROL, VIRTKEY
VK_T, 32867, NOINVERT, VIRTKEY
VK_T, 32937, NOINVERT, ALT, SHIFT, VIRTKEY
VK_U, 32872, NOINVERT, CONTROL, VIRTKEY
VK_V, 32938, NOINVERT, CONTROL, VIRTKEY
VK_V, 32952, NOINVERT, VIRTKEY
VK_BACK, 57643, NOINVERT, ALT, VIRTKEY
VK_DELETE, 32941, NOINVERT, SHIFT, VIRTKEY
VK_END, 32910, NOINVERT, CONTROL, VIRTKEY
VK_F1, 32940, NOINVERT, VIRTKEY
VK_F1, 57669, NOINVERT, SHIFT, VIRTKEY
VK_F2, 32808, NOINVERT, ALT, VIRTKEY
VK_F6, 57680, NOINVERT, VIRTKEY
VK_F6, 57681, NOINVERT, SHIFT, VIRTKEY
VK_F9, 32903, NOINVERT, VIRTKEY
VK_HOME, 32909, NOINVERT, CONTROL, VIRTKEY
VK_INSERT, 32942, NOINVERT, CONTROL, VIRTKEY
VK_INSERT, 32938, NOINVERT, SHIFT, VIRTKEY
"/", 32819, NOINVERT
VK_W, 32965, NOINVERT, CONTROL, VIRTKEY
VK_W, 32863, NOINVERT, SHIFT, VIRTKEY
VK_X, 32941, NOINVERT, CONTROL, VIRTKEY
VK_X, 32955, NOINVERT, VIRTKEY
VK_Y, 57644, NOINVERT, CONTROL, VIRTKEY
VK_Z, 57643, NOINVERT, CONTROL, VIRTKEY
VK_Z, 32889, NOINVERT, VIRTKEY
"[", 32879, NOINVERT
"]", 32880, NOINVERT
}
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

Comments

  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited March 2003
    Ahhhh -- much thanks, Hammer was giving my left hand cramps <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    EDIT: While the functions can be intuited from the intial key binds, I don't suppose there's a listing of function by id anywhere?
    EDIT (again): just saw that the linked program actually displays the menus you're editing, so nm...
  • tommy14tommy14 Join Date: 2002-11-15 Member: 8839Members
    you can also change other things about Hammer's layout, like the size of the boxes that list wad names, or other things.

    see <a href='http://collective.valve-erc.com/index.php?news=1042143117-73007000' target='_blank'>This VERC article on how to modify VHE appearance.</a>
Sign In or Register to comment.