• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

What other keyboard keys can be detected by events?

Status
Not open for further replies.

Deleted member 177737

D

Deleted member 177737

Hey,

Just wondering if its possible to detect keys other than the arrow keys being pressed/released in GUI.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
The only keys I have found that war3 can detect are:

- bj_KEYEVENTTYPE_RELEASE
- bj_KEYEVENTTYPE_DEPRESS
- bj_KEYEVENTKEY_UP
- bj_KEYEVENTKEY_DOWN
- bj_KEYEVENTKEY_LEFT
- bj_KEYEVENTKEY_RIGHT

I don't think it's possible anyway. You can manipulate hotkeys only with:
JASS:
native ForceUIKey                   takes string key returns nothing
What forces player to press given hotkey.
JASS:
native GetLocalizedHotkey takes string source returns integer
What enables you to get hotkey from given source.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Hotkeys of command field orders, escape key with skip cinematic event, maybe space through camera quick position points, 0-9 select groups if defined, 1,2,4,5,7,8 on num pad trigger active items in inventory. Paste/Delete rotate camera, enter when sending chat messages. F1-F5 select own heroes.
 

Deleted member 177737

D

Deleted member 177737

Darn, I wanted to use the letter keys (A-Z). Thx anyways tho.
 
Level 5
Joined
Oct 14, 2010
Messages
100
You could detect those with abilities, if you're willing to make some sacrifices.

If you can ensure the player has a certain unit selected at all times, you can give that unit hidden abilities that respond to the "A" to "Z" hotkeys.

It doesn't work flawless though.
 

Deleted member 177737

D

Deleted member 177737

You could detect those with abilities, if you're willing to make some sacrifices.

If you can ensure the player has a certain unit selected at all times, you can give that unit hidden abilities that respond to the "A" to "Z" hotkeys.

It doesn't work flawless though.

That would work for certain things, thx.
 
Status
Not open for further replies.
Top