Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Keypress event rule not working

Avatar

Level 4

Hi,

I want to fire an event based rule if anyone clicks on the Enter key(keyboard) to get the search results. Anyone successfully created event based rule with keypress "event type". I tried muliple options but rule is not working. Can someone help me on this. Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 4

This snippet just worked for me

if (event.keyCode == 13){ return true; }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

This snippet just worked for me

if (event.keyCode == 13){ return true; }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

Avatar

Level 9

spectaprod wrote...

This snippet just worked for me

  1. if (event.keyCode == 13){
  2. return true;
  3. }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

 

 

Thanks for the quick reply!

-Tacia