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

149
Vistas
Hotkey script working in windows but not in android

I had set up a Tampermonkey script below where if I press the Backspace key for more than 1 second in the URL https://www.google.com, I get a pop up notification. This works perfectly in the desktop Chrome browser for Windows. But in the Kiwi browser (android) with the same Tampermonkey script, pressing the backspace key in the android keyboard (Swiftkey) doesnt cause the popup to trigger. Where may be I am going wrong?

/* globals jQuery, $, waitForKeyElements */
// ==UserScript==
// @name         Google HotKeys
// @version      0.1
// @include      https://www.google.com/
// @require      http://code.jquery.com/jquery-3.x-git.min.js
// @description  personal
// @run-at document-end
// ==/UserScript==

var timer=false;

$('input').on({
    keydown: function(e) {
        var charCode = (e.which) ? e.which : event.keyCode, keyP;
        if (charCode===8) keyP = 'Backspace';
        if (charCode===80) keyP = 'P';
        if (charCode===39) keyP = 'right';
        if (charCode===40) keyP = 'down';
        if (!timer) timer = setTimeout(function(){
           clearTimeout(timer);
           timer=false;
           alert(keyP+' The key has been pressed for 1 second');
        }, 1000);
    },
    keyup: function() {
        clearTimeout(timer);
        timer=false;
    }
});
about 4 years ago · Juan Pablo Isaza
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