Keypress event rule not working | Community
Skip to main content
Level 3
May 19, 2016
Solved

Keypress event rule not working

  • May 19, 2016
  • 2 replies
  • 2604 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by spectaprod

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

2 replies

spectaprodAccepted solution
Level 4
May 19, 2016

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

taciac
Level 9
May 20, 2016

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