Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
AlpineJS x-on:keypress, how to get which key

is there anywhere info about @keypress / x-on:keypress of AlpineJS?

<body class="antialiased bg-black" x-data @keypress="console.log()">

What should I put into log() to get data which key has been pressed? I cant find anything about that in documentation. I want to send pressed key to livewire controller.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Depends on what specific key you wan't to detect but you can do something like this :

<button type="text" @keyup.enter="alert('Submitted!')">Awesome button !</button>

Link to the documentation

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!