Document.addEventListener in titanium

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Document.addEventListener in titanium

Postby martin » Thu Jun 06, 2024 2:35 pm

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
     }
  })
martin
 
Posts: 1
Joined: Thu Jun 06, 2024 12:50 pm

Re: Document.addEventListener in titanium

Postby rafig » Thu Jun 06, 2024 3:02 pm

You could try either the svyKeyListener ( https://github.com/Servoy/svyKeyListener/wiki ) in the Package Manager
or,
Code: Select all
plugins.window.createShortcut
Servoy Certified Developer
Image
rafig
 
Posts: 720
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK


Return to Web Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron