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

226
Views
How do I add a floater button with shortcut to a function key F7?

We had old PDA machines with keypad and function keys and we have a web application that works on them made in classic ASP, jquery, and javascript. After the web application is opened, the user needs to press the F7 function to add a record for scanning a barcode.

Now the old PDA machines are dead and we are in process of purchasing android PDAs. The new machines don't have any keypad, it's just the touch screen. We tried adding a keyboard but there's not much space left on the screen to view the contents of the page and it is a bit tedious for the users.

Is there any way by which we can add a floater button on the page and by pressing it, it simulates function F7 press?

Thanks in advance.

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

0

The following script creates a button element which when clicked, initiates the clickF7 function which simulates F7 key press.

function clickF7() {
  document.dispatchEvent(new KeyboardEvent('keydown', { 'key': 'f7' }))
}

const button = document.createElement('button')
button.innerHTML = 'click f7'
document.body.appendChild(button)

button.onclick = clickF7

document.addEventListener('keydown', function (e) {
  if(e.key === 'f7') {
    console.log('clicked f7')
  }
})

EDIT: added listener to test keydown event EDIT: tested on chrome

enter image description here

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!