Left click is a MetaKey? (PTR)

Status
Not open for further replies.

Deleted member 264867

D

Deleted member 264867

Hi everyone.
This code:
Code:
function test1()
   keytrig = CreateTrigger()
   function key()
      print("key")
   end
   BlzTriggerRegisterPlayerKeyEvent(keytrig,Player(0),OSKEY_W,0,true)
   TriggerAddAction(keytrig,key)
end
doens't work if I hold down the left click (works fine with right click and middle click), just like it doesn't work if I hold down SHIFT or ALT, becouse both are MetaKey and I passed 0 as integer.
I deduced that the left click acts like a metakey, but I tried giving from -1000 to 1000 as integer in the event and nothing changed.

So my question is, what is the problem here? Why doesn't the code work when I hold down the left click? It's becouse it is a MetaKey? And if so, what integer? Or is it just a bug?
I'd like to hear someone's tought about this, it would be really helpful for my map.

Thank for your time.
 
Does the left clicking always blocks the keyevent or do you have to click onto a specific part of the screen?
(UI, PlayAble World)

I created some clickable UI Buttons which stole the key focus after beeing clicked (which disabled hotkeys), Left clicking on the playable world returned the key focus.

Unsure if that helps you in any way.
 

Deleted member 264867

D

Deleted member 264867

Hey thanks for your reply.
Now that I tried actually it only happens when I click on the playable map. This gave me a couple of idea of how to fix this problem in my map but they are not very "nice" I mean I would like not to use them.
Do you think there's something I can do to fix this in a easy way?

Thanks again, I'm able to progress again.
 
Status
Not open for further replies.
Top