Jump to content


Photo

Edit hardcoded hotkeys


  • Please log in to reply
2 replies to this topic

#1 kicker04

kicker04
  • Member
  • 2 posts

Posted 14 July 2013 - 10:12 AM

Hello!

 

I'm looking for a way to change the hardcoded key "select all" in BG2. Doesn't seem to be that easy as editing the keymap.ini file.

 

Thanks a lot for help! :)



#2 Jad

Jad
  • Member
  • 5 posts

Posted 26 July 2013 - 05:04 PM

I don't know how to change the key within BG2, but you could always use a program such as http://www.autohotkey.com/ to change your keys.

For example if you wanted the select all key (=) to instead be (`), you would just create a new text file and put this as the first line:

=::`

Save it and rename the file type to .ahk then run it and you're done.

It would work with any other keys you wish to change as well. Doing a::b would make it that any time you press a it would return b instead, etc. I use this often in any games which don't support full keybindings.


Edited by Jad, 26 July 2013 - 05:05 PM.


#3 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 07 August 2013 - 09:28 PM

The following AutoHotkey code will switch the "0" and "=" keys, effectively swapping which keys send the "zoom-in" and "select all" commands, accomplishing what you want without losing any functionality.  It also remaps the numpad keys to the normal keys which was necessary for me in the original game but may be unnecessary in BGEE...

#IfWinActive Baldur's Gate - Enhanced Edition ahk_class SDL_app
	Numpad0::0
	Numpad1::1
	Numpad2::2
	Numpad3::3
	Numpad4::4
	Numpad5::5
	Numpad6::6
	Numpad7::7
	Numpad8::8
	Numpad9::9
	NumpadEnter::Enter
	=::0
	0::=

The following code will ALSO modify the Tab key so that you can press it once and it will be held down, and press it a second time to release it:

TabVar=0

#IfWinActive Baldur's Gate - Enhanced Edition ahk_class SDL_app
	Numpad0::0
	Numpad1::1
	Numpad2::2
	Numpad3::3
	Numpad4::4
	Numpad5::5
	Numpad6::6
	Numpad7::7
	Numpad8::8
	Numpad9::9
	NumpadEnter::Enter
	=::0
	0::=

Tab::
	{
	If (TabVar="0")
		{
		SendPlay {Tab down}
		TabVar=1
		}
	Else
		{
		SendPlay {Tab up}
		TabVar=0
		}
	}

Return

Attached are compiled version of both scripts (with and without the TAB functionality) and the source code.

Attached File  BGEE Char Remap.rar   616.41K   286 downloads


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

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

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage