PDA

View Full Version : Can the pause button be reassigned?


maks
22 Dec 2007, 22:53
I spilled some tea all over my keyboard and some buttons don't work anymore. Alas, Pause/Break is one of them. So, can I pause the game somehow or do I have to do something about my hardware Very Quickly?! o.o

mammix
23 Dec 2007, 02:19
click ENTER ;)

maks
23 Dec 2007, 03:04
or Escape. But it's not the same - you can't do things.

mammix
23 Dec 2007, 13:20
well, when i clicked pause break button i couldnt do anything too, like after enter :>

maks
23 Dec 2007, 16:39
well, when i clicked pause break button i couldnt do anything too, like after enter :>

I'm not sure what do you mean. In my KoH "pause" = zero time speed. I'm hitting Pause, then giving orders, build up cities, meditate over the political map modes :) and then unpause the game and things go on.

If it frozes your game completely, it may be something wrong with your computer, I'm not sure.

snider
27 Dec 2007, 02:54
My good man.

Download and install this,
http://www.autohotkey.com/download/AutoHotkeyInstall.exe


Then make a file in your KoH directory (keyboard.ahk) and copy paste this:

#SingleInstance force ;force a single instance
;#HotkeyInterval 0 ;disable the warning dialog if hotkeys spamfire
#InstallKeybdHook ;force the keyboard hook (might be faster)
#UseHook On ;might increase responsiveness of hotkeys
;#MaxThreads 20 ;20 of max 20 threads (default is 10)
;SetBatchLines, -1 ;makes the script run at max speed
SetKeyDelay , -1, -1 ;faster response (no delay after or during press)
SetMouseDelay , -1, -1 ;faster response (no delay after or during click)
Thread, Interrupt, -1, -1 ;uses noninterruptable threads


window_class := "Knights Of Honor ahk_class BSSWindowsWindowClass"

exe_path := "E:\Games\Knights Of Honor\KoH.exe"
; Fix this exe path to your KoH

ifWinNotExist, %window_class%
{
Run %exe_path%
winWait, %window_class%
}

setTimer, testactive, 1000 ; focus/exists checks timer

; Here's remapping pause -> space key
space:: send, {pause}

; The rest is just what I use for KoH

;w::up

;s::down

;a::left

;d::right

;tab::F10

;Middle mouse button
;*mbutton::a

;Mouse button 4
;*xbutton1:: send, {pause} ; pause key

;Mouse button 5
;*xbutton2::F10

;wheelup:: send, {numpadadd} ; remapping the wheel you should always
;wheeldown:: send, {numpadsub} ; use send for technical reasons


testactive:
ifWinNotExist, %window_class%
{
ExitApp
}


As you can read from it, now space will work as pause.

Start the game by double clicking the keyboard.ahk file. It will start KoH (don't forget to edit the exe_path line in the file).

maks
27 Dec 2007, 06:48
Kind sir Snider, you're the best!

Thank you very much for this piece of software - both useful and fun to play with. And thank you for sharing the script you're using, too. :)