Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 10:15:30 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to press button widgets with keyboard?  (Read 412 times)
yt
Newbie
*
Posts: 2


View Profile
« on: October 03, 2011, 12:43:41 AM »

When I get focus on the button widget on dialogs I can't press this widget by <Enter> or <Space> keyboard keys.
Pressing <Enter> works with button widgets in ExtJS and Qooxdoo.
Browsers I use: Chrome 14, Firefox 7. OS: Ubuntu 64 11.04
Logged
Bruce_Dickey
Sr. Member
****
Posts: 67


View Profile
« Reply #1 on: October 04, 2011, 03:44:34 PM »

yt,

Search the forum for `onhotkeyup` for a previous answer.

From the API documentation:

    w.onHotKeydown(function( profile, key, e, src ){
        arr = [];
        arr.push(['onHotKeydown',,key.key,key.ctrlKey,key.shiftKey,key.altKey])
    });
    w.onHotKeypress(function( profile, key, e, src ){
        arr.push(['onHotKeypress',,key.key,key.ctrlKey,key.shiftKey,key.altKey]);
    });
    w.onHotKeyup(function( profile, key, e, src ){
        arr.push(['onHotKeyup',,key.key,key.ctrlKey,key.shiftKey,key.altKey]);
        alert(arr);
    });

It looks as if when you receive the key you want you can call activate().

Bruce
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #2 on: October 04, 2011, 09:14:16 PM »

Button's <Enter> or <Space> keyboard triiggers were added into SVN.  Check it out please
Logged
yt
Newbie
*
Posts: 2


View Profile
« Reply #3 on: October 05, 2011, 12:38:23 PM »

Yes, now it works!
Thank you!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!