• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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