Skipping Print Screen / Print key

Now overlay won't block this key
master
Zaafar Ahmed 6 years ago
parent 26dff5547e
commit bc2053bd84
  1. 3
      ClickableTransparentOverlay/HookController.cs
  2. 2
      ClickableTransparentOverlay/Overlay.cs

@ -246,7 +246,8 @@ namespace ClickableTransparentOverlay
// Ignoring Capital/NumLock key so Windows can use it. // Ignoring Capital/NumLock key so Windows can use it.
// Ignoring Win/Super key so we can do Win+D or other stuff. // Ignoring Win/Super key so we can do Win+D or other stuff.
// Create a new issue on the repo if I miss any important key. // Create a new issue on the repo if I miss any important key.
if (!io.KeyAlt && e.KeyCode != Keys.Capital && e.KeyCode != Keys.NumLock && !io.KeySuper) if (!io.KeyAlt && e.KeyCode != Keys.Capital && e.KeyCode != Keys.NumLock && !io.KeySuper &&
e.KeyCode != Keys.PrintScreen && e.KeyCode != Keys.Print)
{ {
e.Handled = true; e.Handled = true;
} }

@ -70,6 +70,8 @@ namespace ClickableTransparentOverlay
window = new Sdl2Window("Overlay", x, y, width, height, SDL_WindowFlags.Borderless | SDL_WindowFlags.AlwaysOnTop | SDL_WindowFlags.SkipTaskbar, false); window = new Sdl2Window("Overlay", x, y, width, height, SDL_WindowFlags.Borderless | SDL_WindowFlags.AlwaysOnTop | SDL_WindowFlags.SkipTaskbar, false);
graphicsDevice = VeldridStartup.CreateGraphicsDevice(window, new GraphicsDeviceOptions(true, null, true), GraphicsBackend.Direct3D11); graphicsDevice = VeldridStartup.CreateGraphicsDevice(window, new GraphicsDeviceOptions(true, null, true), GraphicsBackend.Direct3D11);
// graphicsDevice = VeldridStartup.CreateDefaultD3D11GraphicsDevice(new GraphicsDeviceOptions(true, null, true), window);
NativeMethods.EnableTransparent(window.Handle, new System.Drawing.Rectangle(window.X, window.Y, window.Width, window.Height)); NativeMethods.EnableTransparent(window.Handle, new System.Drawing.Rectangle(window.X, window.Y, window.Width, window.Height));
window.Resized += () => window.Resized += () =>
{ {

Loading…
Cancel
Save