Override Default Keyboard Shortcuts (Accelerators) (Hotkeys)

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

aitchisj
User
Posts: 47
Joined: Mon Apr 04, 2011 4:44 am

Override Default Keyboard Shortcuts (Accelerators) (Hotkeys)

Post by aitchisj »

Hi There,

I apologize in advance if this question has already been asked or the answer is trivial, but I could not find what I was looking for by searching the forums and I've also been looking at the ActiveX SDK Manual and it's also not helping much.

I'm developing a powerbuilder application that does not use your typical/expected keyboard shortcuts (unfortunately). I need the XChange Viewer control to save when I press F2 on my keyboard, instead of the default CTRL+S.

I've been getting pretty much nowhere by trying something along these lines (this is powerbuilder code):

Code: Select all

ole_pdf_view.object.SetProperty("General.AllowAllAccelerators", 1, 0)
ole_pdf_view.object.SetProperty("Commands[#57603].Shortcut.Modifiers",0)
ole_pdf_view.object.SetProperty("Commands[#57603].Shortcut.Key",113)
ole_pdf_view.object.SetProperty("Commands[#57603].ShortcutText","F2")
Can anyone shed light on what I can do to get this to work properly?
I'm using version 2.5.194.0 of the ActiveX DLL.

Thanks,
John
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Override Default Keyboard Shortcuts (Accelerators) (Hotk

Post by Vasyl - PDF-XChange »

Hi, John.

I tried your code-snipped in our examples (C#, VB.NET, C++, etc.) - all works properly.

Can you send us a simple example (*.exe, if its possible) for investigating? Maybe the PowerBuilder somehow incorrectly passes the input parameters into our SetProperty...

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
aitchisj
User
Posts: 47
Joined: Mon Apr 04, 2011 4:44 am

Re: Override Default Keyboard Shortcuts (Accelerators) (Hotk

Post by aitchisj »

Interesting... not the reply I was expecting!

This is so strange, yesterday I absolutely could not get it work. Today, I copied the code that I had written in my previous message on this forum right into my application again to see what would happen (yesterday it was crashing or simply having no effect) and today it works perfectly!

So, false alarm, apparently. Must have been PowerBuilder gnomes... pesky little critters are always playing games with my head.

Thank you for the quick reply and have a great day!
-John
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7370
Joined: Wed Mar 25, 2009 10:37 pm

Re: Override Default Keyboard Shortcuts (Accelerators) (Hotk

Post by Paul - PDF-XChange »

:)
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com