Forum Jump :

Author Message

Posts: 131

Level: Member

Country: us
Age: 23
In-game name: Joshua

#1 Posted at 2017-08-31 21:23        
Ultimately, I need to remap the dialog scroll functionality from the up and down arrow keys to the page up and page down keys. If you know of any way to do that, you can effectively skip the rest of what I have written.

I don't know how to directly access the dialog key binds through SQF, so I figure the way to do this is to use the key down event handler. My code is below:
_KeyDown1 =(findDisplay 1) displayAddEventHandler ["KeyDown", {
	switch (_this select 1) do {
		case(201):{_this set [1,200];};    //Page down to arrow down
		case(209):{_this set [1,208];};    //Page up to arrow up
		case(46):{true};                   //Ignore C
		case(1):{true};                    //Ignore escape
I intend for this to pass off page up and page down as arrow up and arrow down respectively (201 and 209 are page up and down; 200 and 208 are arrow up and down) as well as have the engine ignore presses to c and escape (the only other keys dialog seem to override).

While the C and escape keys work as intended and I get access to the arrow up and down keys in my scripts, I am unable to scroll the text as the page up and down keys are not reassigned to trigger dialog scrolling with this code.

Is this possible? If so, what am I doing wrong? If not, what other work arounds should I consider?

Thanks for the help!