Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda