Patagames Software Support Forum
»
Pdfium.Net SDK
»
Common Questions
»
Detect key press (ctrl+s) while focused on a check/radio form field
Rank: Member
Groups: Registered
Joined: 4/15/2018(UTC) Posts: 24   Location: Sydney Thanks: 2 times
|
Hi
We're using the WPF viewer, and everything has been great. I need to detect keyboard ctrl+s in order to save the document. I can detect it find for most places, but it seems the keyboard events don't raise if the focus is on a checkbox or radio button form field (it works for a text box fine).
Just hoping there is a way that we can capture the keyboard event here, or if there is any known way in the viewer/document to respond to a ctrl+s event to save the document?
Thanks
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
I have checked on my document the following Code:
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
base.OnPreviewKeyDown(e);
}
Keystrokes are intercepted without any problems. Could you please provide your document and code. Although I'm sure that the document does cannot affect to the standard UIElement
|
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/15/2018(UTC) Posts: 24   Location: Sydney Thanks: 2 times
|
Oh yep. Thanks! I was hooking into the OnPreviewDown event rather than overriding it. That works. Cheers
|
|
|
|
|
|
Patagames Software Support Forum
»
Pdfium.Net SDK
»
Common Questions
»
Detect key press (ctrl+s) while focused on a check/radio form field
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close