Custom Widget react on "ESC" Key

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
mprattinger
New User
Posts: 4
Joined: Wed Oct 07, 2020 8:42 am
First Name: Michael
Last Name: Prattinger
Company Name: BECOM Electronics GesmbH
State / Province: Outside Canada/USA
Country: Austria
Contact:

Custom Widget react on "ESC" Key

Post by mprattinger »

Hi,

we have created a widget which we use as the topbar in our screens. Now we want to react when the user presses the "ESC"-Key and run code which is in the widget.
I can attach to the keyevent but it seems that the ESC and all the F-keys are catched by pui and is not bubbled up to my event listener.
Is there a way, how we can register to these keypresses too?

Thanks,
Michael
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Custom Widget react on "ESC" Key

Post by Scott Klement »

You would use the addEvent() function to add a keyup or keydown event to the screen https://docs.profoundlogic.com/x/KQAy and the removeEvent() routine to remove it later. https://docs.profoundlogic.com/x/KwAy

Profound UI does not block these events from propagating ("bubbling up")
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests