Jump to content


Photo

Why Doesn't ^WheelDown Work In My Script?


  • Please log in to reply
3 replies to this topic

#1 Mulsiphix

Mulsiphix
  • Members
  • 4 posts

Posted 19 April 2012 - 01:18 AM

I am trying to make a simple keyremapping script for Borderlands. This is what I am trying to do:

If Left Control key is not pressed, bind WheelDown to send the key PGDN
If Left Control key is pressed, bind WheelDown to send Down key

This is my basic script:
WheelDown::PGDN
^WheelDown::Down

What am I doing wrong?

#2 Spawnova

Spawnova
  • Members
  • 162 posts

Posted 19 April 2012 - 06:21 AM

I am not sure where you problem is at, more info would be great.

does this solve your problem though?

WheelDown::PGDN
<^WheelDown::Down ;left control only


#3 janopn

janopn
  • Members
  • 691 posts

Posted 19 April 2012 - 01:02 PM

Does this work?

*WheelDown::
SetKeyDelay -1
Send {Blind}{PGDN DownTemp}  
return

*WheelDown up::
SetKeyDelay -1 
Send {Blind}{PGDN Up}
retur

If so, apply it for second remap too.

#4 Mulsiphix

Mulsiphix
  • Members
  • 4 posts

Posted 19 April 2012 - 07:25 PM

Borderlands didn't see the best PC port. It was originally made for gaming consoles and it shows in many places. Scroll menu's either work by using the Up and Down keys or the PGUP and PGDN keys. I'm trying to make the mousewheel perform both sets of keys. Unfortunately when I bind both the down and pgdn key to WheelDown it messes up one of the menu's in the game. This is why I figured I would have WheelDown perform PGDN and LControl+WheelDown perform Down key.

I had no idea you could specify which control key! Thank you very much for that. The game continues to be fickle though. When I use the <^WheelDown binding it seems to perform the down key twice. I've tried both:
<^WheelDown::Down
<^WheelDown::
Send {Down}
return
but so far each behaves the same. Any ideas if the problem lies within the game or if <^ could be causing the down key to fire twice? Note that if I just press the Down key it only presses the key once. I've reset all of my Logitech Mouse bindings to their default to make sure nothing is going on there. Why does doing something so simple have to be so hard =(. Thank you so much for your help! :mrgreen:

EDIT
Lol I figured out a work around. This code now makes it appear as if the Down key is only being pressed one time =P

WheelDown::PGDN
<^WheelDown::
Send {Down}
KeyWait WheelDown
Send {Up}
return