🖱️ Dead Key Presser is a Python script for simulating dead key presses (such as SHIFT, ALT, CTRL, or CAPS LOCK) at regular intervals on Windows.
Dead Key Presser is a tool that simulates pressing a "dead key" on your keyboard at regular intervals. It can simulate keys like SHIFT, ALT, CTRL, and CAPS LOCK, which are useful for keeping a session active or for automation purposes. This script is designed to work only on Windows using the win32com
library for interacting with the Windows environment.
- Windows OS (the script uses Windows-specific APIs)
- Python 3.x
- pywin32 (Python library for Windows COM objects)
You can install the necessary dependencies using:
pip install pywin32
-
Clone this repository to your local machine:
git clone https://github.com/your-repo/dead-key-presser.git cd dead-key-presser
-
Install the required Python dependencies:
pip install pywin32
-
Run the script to simulate pressing the SHIFT key every 60 seconds:
python shift_key_presser.py --interval 60 --key shift
The script provides several options to configure the behavior:
--interval
: Set the time interval (in seconds) between key presses. Default is 60 seconds.--key
: Choose which dead key to simulate. Available choices are:shift
: Left SHIFT key (default)alt
: ALT keyctrl
: CTRL keycapslock
: CAPS LOCK key
-
Simulate pressing the ALT key every 30 seconds:
python shift_key_presser.py --interval 30 --key alt
-
Simulate pressing the CAPS LOCK key every 90 seconds:
python shift_key_presser.py --interval 90 --key capslock
To run and test the script:
- After installing the dependencies, you can run the script using the provided command-line options.
- To test, open a text editor, run the script, and observe the simulated key presses.
- Adjust the
--interval
and--key
parameters to test different configurations.
Created by François-Xavier Michaud.
You can connect with me on LinkedIn.
This project is licensed under the MIT License. See the LICENSE file for details.
(c) 2023, François-Xavier Michaud