cancel
Showing results for 
Search instead for 
Did you mean: 

et_KEY_DOWN works in form-context mode only

AlexGrebennikov
Active Contributor
0 Kudos

Hi!

We have to implement a function similar hot-key functionality using SDK-UI.

Nowadays we are using version 2004C and the problem is that et_Key_Down event fires only in form-context.

It means that there is no any key-press event if none form is active at the moment.

Even main-menu form (command center) isn't a 'form' in this case (we think the reason is in lack of any 'focus-receiving' control)

Is it possible to catch et_KEY_DOWN while command-center only is opened or no any form is opened?

Could anyone check the issue on 2005 (better, 2006 in case of SAP employee) version and/or suggest a solution (not using WinAPI) for it?

Kind regards,

Alexey

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alexey!

We are using SAP Business One 2005A and

there exist an "et_Form_Key_Down" Event!


Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent

        If pVal.Before_Action = False Then
            If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_KEY_DOWN Then
                Select Case pVal.CharPressed
                    Case "122"
                        SBO_Application.MessageBox("hello")
                End Select
            End If
        End If

End Sub

I don't use Filters. so if you do so, you should look how to set them

greetz

Matthias

AlexGrebennikov
Active Contributor
0 Kudos

Thank you for your answer, Matthias.

I know, it works perfect in form-mode.

The question is how to catch (using UI API only) any-key pressing while no one form is opened?

Former Member
0 Kudos

I don't know if i understand you right Alexey.

But isn't there at least one form opened from SAP?

Former Member
0 Kudos

Hi Alexey,

We didnt succed on that, and from our experience its better to use the Win32API for that purpouse. But I suppose you already know that.

A couple links about it:

http://www.codeproject.com/system/KeyHook.asp?df=100&forumid=46493&exp=0&select=1343782

http://www.codeguru.com/vb/gen/vb_system/keyboard/article.php/c4829

Hope helps,

Ibai

AlexGrebennikov
Active Contributor
0 Kudos

Matthias:

et_FORM_KEY_DOWN works fine, thank you (i must not use filters because of add-on specific)

Another important question is how to catch key-pressing while any

top menu (context form menu as well) is opened (one of add-on features is to capture SBO screens)?

In 2004C i can't do that..

Answers (0)