Intercept when esc key is pressed

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Intercept when esc key is pressed

Post by lidds »

I have a situation that if a user has selected to place an annot element e.g. Rectangle and they press ESC on the keyboard to exit the command I need to intercept that the ESC key has been pressed.

I have trying the following, but with no joy:

Code: Select all

        Public Sub OnEvent(pSender As PDFXEdit.IUIX_Obj, pEvent As PDFXEdit.IUIX_Event) Implements PDFXEdit.IUIX_ObjImpl.OnEvent
            If pEvent.Code = CInt(WM_KEYDOWN) Then
                Debug.WriteLine("Key pressed")
            End If
I guess I am doing something wrong, or do you have a build in event that is fired that I need to use?

Thanks

Simon
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Intercept when esc key is pressed

Post by Sasha - Tracker Dev Team »

Hello lidds,

You can use the https://sdkhelp.pdf-xchange.com/vi ... lActivated event to intercept when the tool was changed.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply