Thread Tools Display Modes
05/25/15, 12:04 PM   #1
JohnnyKing94
 
JohnnyKing94's Avatar
Join Date: Mar 2015
Posts: 45
Onkeydown handler

I want to know why with with the handler onkeydown there is no such propagation of the other binding events when i click any other keys that is not the "A" key??? what am i doing wrong?


Code:
MyPanel:SetHandler("OnKeyDown", function(self, key, ctrl, alt, shift, command) 
   if( key =="A")
      RUNNING NEXT LEVEL
   end
end)
  Reply With Quote
05/25/15, 12:16 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Originally Posted by JohnnyKing94 View Post
I want to know why with with the handler onkeydown there is no such propagation of the other binding events when i click any other keys that is not the "A" key??? what am i doing wrong?


Code:
MyPanel:SetHandler("OnKeyDown", function(self, key, ctrl, alt, shift, command) 
   if( key =="A")
      RUNNING NEXT LEVEL
   end
end)
http://wiki.esoui.com/Globals#KeyCode

Lua Code:
  1. if( key == KEY_A )
  Reply With Quote
05/25/15, 12:31 PM   #3
JohnnyKing94
 
JohnnyKing94's Avatar
Join Date: Mar 2015
Posts: 45
Originally Posted by Ayantir View Post
http://wiki.esoui.com/Globals#KeyCode

Lua Code:
  1. if( key == KEY_A )
but i don't want the keycode... what i want to say is to prevent a single bind_key from being pushed but allowing all others (since for crown store i can have A,B,C,D etc), example

Code:
if( key == "INTERCEPT_TOGGLE_MARKET" )
  Reply With Quote
05/25/15, 01:12 PM   #4
Rarder44
Join Date: May 2015
Posts: 1
Ayantir i think JohnnyKing94 would know how to propagate the key get to the "main game"
Example:
my key I is keybinded with Inventory
If i click I, the OnKeyDown Handle catch that key and the inventory does not open.
So, i think he try to propagate the key given by the "function(self, key, ctrl, alt, shift, command)" to the """"Top Level Game""""

sorry JohnnyKing94, but i don't know the answer
  Reply With Quote
05/25/15, 11:54 PM   #5
JohnnyKing94
 
JohnnyKing94's Avatar
Join Date: Mar 2015
Posts: 45
Stiil anyone got the solution?? thx in advance
  Reply With Quote
05/26/15, 08:24 AM   #6
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
There's no way I can think of to do this with the existing code. However, we might be able to change the OnKeyDown, OnKeyUp and OnChar handlers to continue propagating the key if false is returned from the handler. Would that allow you to do what you're trying to do?
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Onkeydown handler


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off