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

Get "Cannot install keyboard listener" error and other issues #4323

Closed
ukWaqas opened this issue Jun 15, 2020 · 12 comments
Closed

Get "Cannot install keyboard listener" error and other issues #4323

ukWaqas opened this issue Jun 15, 2020 · 12 comments
Labels
Product-FancyZones Refers to the FancyZones PowerToy Product-Shortcut Guide Refers to the Shortcut Guide PowerToy Resolution-External External issue, unrelated to PowerToys

Comments

@ukWaqas
Copy link

ukWaqas commented Jun 15, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.900]
PowerToys version: v0.18.2
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Not particularly sure on the steps to re-produce, as it was working at some point. It always happens on my machine, but cannot vouch if it will always happen on everyone elses.

The only thing I can assume could have resulted this was because I disabled "Run at startup", and then re-enabled it to fix another issue (UAC Promt on boot #2578) [sic]

However, whenever Power Toys launches now, I get the following message box popup:

msgbox

Furthermore, I notice that "Launch Zones Editor" in FancyZones stopped working as well.

The Win + ' key does not work, but the holding of shift to activate zones works fine. As the zones were already created by me when they were working, I still have the same zone layout, but as mentioned, I cannot launch the Zones Editor anymore so if I wanted to change this, I cannot.

Expected behavior

Work as before. That is I should not get the "Cannot install keyboard listener." dialog, and Zones editor should work.

Actual behavior

I get the following message at startup:
msgbox

And nothing happens when I click Launch Zones Editor

Screenshots

@enricogior enricogior added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-FancyZones Refers to the FancyZones PowerToy labels Jun 15, 2020
@crutkas
Copy link
Member

crutkas commented Jun 19, 2020

@enricogior, what do we need feedback here on?

@crutkas crutkas added Issue-Bug Something isn't working and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 19, 2020
@enricogior
Copy link
Contributor

@crutkas @ukWaqas
we need to know if rebooting the machine solve the problem.
Also try to uninstall and reinstall.
This is a Windows API failing, nothing that can be fixed in the PowerToys code, we need to figure out if there is something wrong with the system.

@ukWaqas
Copy link
Author

ukWaqas commented Jun 22, 2020

@enricogior My Keyboard is USB keyboard that I do switch between my desktop PC (which has Windows and PowerToys) and laptop. I do this by removing from my PC USB port and insert into laptop periodically.

However, I can confirm that when I have inserted into my desktop PC, and rebooted my machine, I still get the error message I have posted above.

Also, please note that the SHIFT key and drag to get the zones showing works.

I believe it is related to how PowerToys works. I didn't have this issue earlier (v0.18.1), which is why I have my custom zones already set up. I can no longer edit my zones using "Launch Zones Editor".

The following code is worth looking at:

https://github.com/microsoft/PowerToys/blob/master/src/modules/fancyzones/dll/dllmain.cpp

as that has the error for cannot install keyboard listener for fancy zones.

I can confirm my desktop pc works fine whenever I have the USB keyboard into the USB port. I don't encounter any keyboard related issues with any other application.

Ideally, I do not want to uninstall and install PowerToys.

@ukWaqas
Copy link
Author

ukWaqas commented Jul 3, 2020

Okay I have an update on FancyZones. I upgraded to v0.19.0. I got the same issue. So I uninstalled PowerToys, and then reinstalled (using v0.19.0 release)

Now the following work/don't work:

  • Launch zones editor works.
  • SHIFT to activate zones while dragging does not work (it is ticked).
  • Cannot install keyboard listener error dialog on startup still comes up.
  • Use a non-primary mouse button to toggle zone activation does work.

Also note I have a new USB keyboard, and that has made no difference in preventing the error message box on keyboard listener coming up. Also note, that the keyboard works completely fine on all other applications.

@enricogior
Copy link
Contributor

@ukWaqas
thank you for the update.
On your system, for unknown reason, the low level keyboard hook is not working, it's something that usually application don't do, so that's why the keyboard works with any other app.
It's the first time we have a report for this type of problem, and it's a low level system problem and in theory it has nothing to do with the actual physical keyboard.

@enricogior enricogior added the Product-Shortcut Guide Refers to the Shortcut Guide PowerToy label Jul 6, 2020
@ukWaqas
Copy link
Author

ukWaqas commented Jul 6, 2020

@enricogior Thanks for the response. Are there some tests I can run to isolate the issue? Perhaps show some log information?

It still doesn't example why it was working fine for the first few weeks of me using PowerToys (v0.18.1). I only really got this issue since v0.18.2, but having said that, I had only been using v0.18.1 for a couple of weeks.

Could it be a Windows Update that played around with the keyboard hook? Strange why the keyboard functionality in other features of PowerToys like PT Run worked fine in v0.18.2.

@enricogior
Copy link
Contributor

enricogior commented Jul 7, 2020

@ukWaqas
we will have to create a small test app that reproduces the problem outside of PowerToys.

@ukWaqas
Copy link
Author

ukWaqas commented Sep 3, 2020

Will this issue be addressed - the latest version of PowerToys v0.21.1, the following options crash:

  • Color Picker
  • FancyZones
  • PowerRun

Unsure if they are related.

What needs to be done to resolve this issue? In previous reply, @enricogior mentioned that a small test app that reproduced problem outside of PT is a possibility. When will this be ready?

@enricogior
Copy link
Contributor

This PR #6454 will help addresses the problem producing a better error report.
It will be included in the 0.23 release (end of September).

@crutkas
Copy link
Member

crutkas commented Sep 22, 2020

Issue #5414 helped us determine there are some apps like SentryBay that basically are preventing us from doing the key hooks.

is your PC managed by your company?

@crutkas crutkas added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 22, 2020
@enricogior
Copy link
Contributor

@ukWaqas
Copy link
Author

ukWaqas commented Sep 23, 2020

Thanks @crutkas for your response. I think you’re right - is the sentryBay application! It’s my personal desktop but I do use it for work purposes from time to time via the sentrybay application. I’ll close this issue as I think that is the cause.

This issue has been closed on the basis that sentry application interferes with the normal working of PT. The only current resolution for this issue is to remove sentrybay application from windows.

@ukWaqas ukWaqas closed this as completed Sep 23, 2020
@enricogior enricogior added Resolution-External External issue, unrelated to PowerToys and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Issue-Bug Something isn't working labels Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-FancyZones Refers to the FancyZones PowerToy Product-Shortcut Guide Refers to the Shortcut Guide PowerToy Resolution-External External issue, unrelated to PowerToys
Projects
None yet
Development

No branches or pull requests

3 participants