Keypress Event

Develop and Deploy Cross-Browser Web Apps .

Keypress Event

Postby joedarock » Wed Aug 10, 2016 3:05 pm

Is there an event that fires whenever any keyboard key is pressed, unrelated to any UI element? Can you show an example of how to include the code and how to read the value of the key that was pressed?

Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Keypress Event

Postby support » Mon Aug 29, 2016 7:29 am

Class('App', 'xui.Module',{
iniComponents : function(){
// [[Code created by CrossUI RAD Studio
var host=this, children=[], append=function(child){children.push(child.get(0));};

return children;
// ]]Code created by CrossUI RAD Studio

xui.echo("Your pressed - "+xui.Event.getKey(e).key);
Posts: 351
Joined: Sat Apr 27, 2013 9:22 am

Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests