Skip to main content
1 of 2
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

You can get the keyCode from the event object .Below is what I tried and worked

({
  searchEvents: function(component, event, helper) {
      console.log(event.keyCode);
      if(event.keyCode == 13){
        alert('Enter key pressed');
      }
   }
 })

You can also use which as well .Below is the console.log of whole event object

enter image description here

Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214