Home > Software engineering >  Windows API to disable Filter Keys dialog?
Windows API to disable Filter Keys dialog?

Time:09-18

My C game allows users to hold down the shift key for a speed boost, but after 8 seconds this causes an annoying dialog to pop up on a fresh Windows 10 machine ("Do you want to turn on Filter Keys?"). Is there a way to disable this programmatically while my game is running?

CodePudding user response:

I suggest you could refer to the Doc:Disabling Shortcut Keys in Games

To avoid these issues, you should disable these keys when running in full-screen mode, and either enable the keys back to their default handlers when running in windowed mode or exit the application.

To turn off these shortcuts:

1,Capture the current accessibility settings before disabling them.

2,Disable the accessibility shortcut when the application goes into full-screen mode if the accessibility feature is off.

3,Restore the accessibility settings when the application goes into windowed mode or exits.

You could try to use SystemParametersInfo to Get and Set System Information.

  • Related