How to assign a method to keyboard combinations?

Questions, tips and tricks and techniques for scripting in Servoy

How to assign a method to keyboard combinations?

Postby Tony_Adrian » Sun May 11, 2003 12:58 pm

Presently in our FMP solution we assign redundant tasks that cannot be automated to keyboard commands. We think in Servoy we will also have this need on a form-by-form basis. Example: "ctrl + 5"

Thank you.
Tony Adrian RN

Nursing Data Inc.
A Medicare Approved Software Billing Vendor
Database/Document Management for the Health Care Industry
Servoy, Sybase, Lotus Domino/Notes
Tel: (337) 394-8548
Fax: (337) 394-8504
sales@NursingData.com
Tony_Adrian
 
Posts: 42
Joined: Thu Apr 24, 2003 3:24 am

Postby maarten » Thu May 15, 2003 11:50 am

Hi Tony,

Do you mean something like this...

//get the last key modifiers of last action
( shift = 1,ctrl = 2,meta = 4,alt = 8 )

var m = application.getLastKeyModifiers();
if ( m == 1 ) //shift
{
..script1
}
else if( m == 3 ) //shift+ctrl
{
...script2
}
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

I believe that's it ...

Postby Tony_Adrian » Thu May 15, 2003 12:46 pm

We'll have to try it.

Thanks!
Tony Adrian RN

Nursing Data Inc.
A Medicare Approved Software Billing Vendor
Database/Document Management for the Health Care Industry
Servoy, Sybase, Lotus Domino/Notes
Tel: (337) 394-8548
Fax: (337) 394-8504
sales@NursingData.com
Tony_Adrian
 
Posts: 42
Joined: Thu Apr 24, 2003 3:24 am

Re: I believe that's it ...

Postby bcusick » Thu May 15, 2003 6:31 pm

Tony_Adrian wrote:We'll have to try it.

Thanks!


IMPORTANT NOTE: The application.getLastKeyModifiers() is a Servoy 1.1 feature.

:wink:

Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby Harjo » Mon Jun 02, 2003 2:25 pm

Will it be possible in the next-release to link a key-combination directly to a method? For example ALT-T or CTRL-K will launch a specific method!
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby edward » Mon Jun 02, 2003 3:00 pm

Oh am I glad you asked that! One of the sweetest new features of 1.1 is the ability to execute Methods after keyboard commands.

List includes:...

onSortComd
onShowAllRecordsCmd
onShowOmittedRecordsCmd
onPrintPreviewCmd
onNewRecordCmd
onFindCmd
onDuplicateRecordCmd
onDeleteRecordCmd
onDeleteAllRecordsCmd

Please DO note that it is not yet possible to assign custom keystrokes to specific methods, that functionality did not make it into 1.1 but is still on the requested features list.

The possibilities with this functionality are endless!!

Great work Dev Team
Edward Callaghan
Servoy
edward
 
Posts: 142
Joined: Wed Apr 23, 2003 9:35 pm
Location: London, UK


Return to Methods

Who is online

Users browsing this forum: No registered users and 9 guests

cron