• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

METAKEY

Status
Not open for further replies.
Level 14
Joined
Oct 19, 2014
Messages
187
It's for keys like ctrl, alt, shift, etc. So you can detect a Shift+Space keypress instead of just any old space keypress, for example.
So how to know if what number does ctrl or shift have?
I was searching constant variable at common of metakeys but its nothing.

Or what if i put 0 so it will direct to nothing metakeys?

Maybe its the number that was converted by integer to oskey?
 
Last edited:
Level 9
Joined
Jul 30, 2018
Messages
445
MetaKey it is an integer but it is used as a bitfield. MetaKeys are "none"(0), "shift"(1), "control"(2), "alt"(4) and "META"(8) (windows key).
This MetaKeys can be combinded for example combining control and alt: 2 + 4 = 6. When the user holds control and alt and presses a oskey the event will only run when it was registered with metakey 6.
Inside the press event MetaKey-Keys always have the metakey they start themself or a bigger one if other MetaKeys are hold down during that process.
When holding down all Metakeys the result would be 1 + 2 + 4 + 8 = 15

[JASS/AI] - Oskey - Player Key Event
 
Status
Not open for further replies.
Top