Page 1 of 1

Document.addEventListener in titanium

PostPosted: Thu Jun 06, 2024 2:35 pm
by martin
Is it possible to add an event listener to the document in titanium?
example:
Code: Select all
  document.addEventListener("keydown", function(event){
     if(event.ctrlKey && event.key == "F"){
              //do stuff
     }
  })

Re: Document.addEventListener in titanium

PostPosted: Thu Jun 06, 2024 3:02 pm
by rafig
You could try either the svyKeyListener ( https://github.com/Servoy/svyKeyListener/wiki ) in the Package Manager
or,
Code: Select all
plugins.window.createShortcut