In the pages view I want to get what key was pressed in the "e.pagesView.keyboard" event. It looks like it is fired 3 times, 256 - KEY_DOWN, 257 = KEY_UP, and 258 = KEY_PRESS?
But I cannot find out how to tell which key was pressed.
Thank you,
Stephen
How do I get what key is pressed from e.pagesView.keyboard?
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.
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.
-
- User
- Posts: 123
- Joined: Wed Mar 25, 2015 10:59 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: How do I get what key is pressed from e.pagesView.keyboa
Hello Stephen,
Here's the code snippet on how you can get to the WM_KEYDOWN event:
Here's the link to the event description:
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Cheers,
Alex
Here's the code snippet on how you can get to the WM_KEYDOWN event:
Code: Select all
if (e.nEventID == nIDS[(int)IDS.e_pagesView_keyboard])
{
IntPtr outPtr = new IntPtr(e.pEvent.Param2);
PDFXEdit.IUIX_Event evt = (PDFXEdit.IUIX_Event)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
if (evt.Code == 0x0100) //#define WM_KEYDOWN 0x0100
{
//Here you have the WM_KEYDOWN message with it's wParam and lParam as Param1 and Param2
}
}
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 123
- Joined: Wed Mar 25, 2015 10:59 pm
Re: How do I get what key is pressed from e.pagesView.keyboa
Perfect, thank you Alex.
Appreciate your help.
Appreciate your help.
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: How do I get what key is pressed from e.pagesView.keyboa
Hi there,
I also need to know what key (System.Windows.Forms.Keys, System.Windows.Forms.Control.ModifierKeys) or combintaion has been pressed.
It is not familiar to me to work with WM_KEYDOWN.
I can't debug the evt.Code of your example. Visual Studio just shows nothing
Could you please fill your curly braces with an example?
Best regards,
cew
I also need to know what key (System.Windows.Forms.Keys, System.Windows.Forms.Control.ModifierKeys) or combintaion has been pressed.
It is not familiar to me to work with WM_KEYDOWN.
I can't debug the evt.Code of your example. Visual Studio just shows nothing
Could you please fill your curly braces with an example?
Code: Select all
{
//Here you have the WM_KEYDOWN message with it's wParam and lParam as Param1 and Param2
}
cew
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: How do I get what key is pressed from e.pagesView.keyboa
Hello cew,
In the previous post, I've provided a link to the msdn page where the WM_KEYDOWN event is described. Here's a screenshot from my VS:
Cheers,
Alex
In the previous post, I've provided a link to the msdn page where the WM_KEYDOWN event is described. Here's a screenshot from my VS:
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: How do I get what key is pressed from e.pagesView.keyboa
Hi Alex,
is it possible that I can't see anything because I do not have *.dbg-files?
Best regards,
cew
is it possible that I can't see anything because I do not have *.dbg-files?
Best regards,
cew
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: How do I get what key is pressed from e.pagesView.keyboa
Hello cew,
You can try and pass this information to the Output or to some list control to see the values.
Cheers,
Alex
You can try and pass this information to the Output or to some list control to see the values.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ