This is an Electron application that creates two separate windows: a main application window and an overlay window. The main window is positioned on the left half of the screen, and the overlay window is positioned at the top right, with dimensions of 200x200 pixels.
- Main Window: A standard Electron browser window that can be used for your primary application interface.
- Overlay Window: A small, transparent, frameless window that is always on top. It can be moved independently and is positioned at the top right of the screen. Overlay can be included in screenshot by selecting screen 1
- Keyboard Events: Listens for key events using the
uiohook-napi
library, triggering actions like screenshots or creating a match when specific keys are held down.
-
Clone the Repository:
git clone https://github.com/dabruhce/game-screen-capture.git cd game-screen-capture
-
Install Dependencies:
npm install
-
Run the Application:
npm start
-
On startup, the application will create two windows:
- Main Window: Positioned on the left half of the screen.
- Overlay Window: Positioned at the top right of the screen at coordinates (880, 0), with a size of 200x200 pixels.
-
Key Bindings:
- Hold the Tab key for 300ms to trigger a screenshot action.
- Hold the Backspace key for 300ms to trigger the creation of a match.
-
Changing Window Positions and Sizes:
- Modify the
createWindow
andcreateOverlayWindow
functions inmain.js
to adjust the positions and sizes of the main and overlay windows.
- Modify the
-
Overlay Content:
- Edit
overlay.html
to customize the content displayed in the overlay window.
- Edit
- Electron - Build cross-platform desktop apps with JavaScript, HTML, and CSS.
- uiohook-napi - Native Node.js module for global keyboard and mouse hooking.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request or open an issue if you have any suggestions or improvements.
- Thanks to the creators of Electron and uiohook-napi for making this project possible. Forked from JohnJunior/electron-desktop-capturing.