KB-25172: Creating hot keys in E3.

Question:

How can I create hot keys in E3?

Solution:

You can do so by using screen’s KeyDown or KeyUp events, where you can identify the code of the pushed key via KeyCode variable.

Example of script:

Sub MainScreen_KeyDown(KeyCode, Shift)
    MsgBox KeyCode   
End Sub

Based on the returned code, you can create a script that tests this value and performs any other actions necessary.

For example:

Sub MainScreen _KeyUp(KeyCode, Shift)
    if KeyCode = 112 then
        MsgBox “You’ve pressed F1”
    end if
End Sub

NOTE: The KeyDown and KeyUp events are executed only if the screen where the scripts were created is opened and has the focus.

Attached to this article is a sample application developed with Elipse E3 version 3.1 build 270.

Attachments:

Sample.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *