Page 1 of 1

How to assign a method to keyboard combinations?

PostPosted: Sun May 11, 2003 12:58 pm
by Tony_Adrian
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.

PostPosted: Thu May 15, 2003 11:50 am
by maarten
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
}

I believe that's it ...

PostPosted: Thu May 15, 2003 12:46 pm
by Tony_Adrian
We'll have to try it.

Thanks!

Re: I believe that's it ...

PostPosted: Thu May 15, 2003 6:31 pm
by bcusick
Tony_Adrian wrote:We'll have to try it.

Thanks!


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

:wink:

Bob Cusick

PostPosted: Mon Jun 02, 2003 2:25 pm
by Harjo
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!

PostPosted: Mon Jun 02, 2003 3:00 pm
by edward
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