skyrim-community-shaders icon indicating copy to clipboard operation
skyrim-community-shaders copied to clipboard

Screenshot key toggles shaders on/off when EffectToggleKey is unbound (0).

Open shadow147-github opened this issue 9 months ago • 0 comments
trafficstars

Disclaimer: I am not familiar with the source code, nor did I spend all that much time reading through the (suspected) problem area.

Problem:

When EffectToggleKey is 0 (unbound) the default Skyrim screenshot key toggles shaders on/off every time a screenshot is taken.

What I think is happening:

  1. Menu.cpp:1418 returns event.keyCode for PrintScreen key because VK_PRINT hasn't been implemented in Menu.cpp:1333.
  2. Fallback function at Menu.cpp:1421 most likely returns 0.
  3. Menu.cpp:1437 does not check for settings.EffectToggleKey being equal to 0 (unbound).
  4. Thus the PrintScreen key (default Skyrim screenshot key) toggles shaders on/off. The check at Menu.cpp:1437 evaluates to: } else if (0 == 0) {

Potential fixes:

  1. Implement missing VK keys in DIKToVK and get rid of MapVirtualKeyEx.
  2. Change the input parameters to MapVirtualKeyEx, or figure out why the scancode for PrintScreen is not getting translated to a VK.
  3. Check for unbound keys i.e. never compare pressed key to 0; or redefine what an unbound key means: -1 for instance.

Environment:

Community Shaders 1.1.15 Corsair K100 RGB Scandinavian, QWERTY Windows 11 Pro 23H2

shadow147-github avatar Feb 17 '25 19:02 shadow147-github