Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerPoint Addin : Global Key Press Hook doesn't trigger but App Key Press Hook does #162

Open
nkimber opened this issue Jun 25, 2022 · 0 comments

Comments

@nkimber
Copy link

nkimber commented Jun 25, 2022

The following line:
Hook.GlobalEvents().KeyPress+= this.GlobalHookKeyPress;
does not trigger within a PowerPoint Addin.
However, the following line:
Hook.AppEvents().KeyPress+= this.AppHookKeyPress;
does trigger the event handler.

This is a problem because if I have a group of shapes selected in PowerPoint and then click a key, the default PowerPoint handler triggers prior to the AppEvents() event, causing an audible 'ding' from PowerPoint before my own code executes. I'm hoping that if I can get the GlobalEvent to trigger, then this will allow be handle the key press before PowerPoint and then set e.Handled=true; preventing PowerPoint from making an audible 'bing'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant