Skip to content

mrfredman/drop-ctrl-locker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Drop CTRL Auto Lock on USB Switch

This cross-platform project locks keyboard input when a Drop CTRL V1 keyboard is reconnected via USB switch.

🧠 Use case: When switching your keyboard between a work and home computer, this script blocks all input until you press a specific key (Pause or Scroll Lock) or wait 30 seconds.

🖥 Supported Platforms

  • ✅ Windows 10/11
  • ✅ macOS (via Hammerspoon)

🔐 Behavior

  • Locks input when the Drop CTRL is plugged in.
  • Unlocks on specific key press (Pause on Windows, F19/Scroll Lock on macOS).
  • Or auto-unlocks after 30 seconds.
  • Detects keyboard reconnect via USB (not based on system idle or app focus).

📂 Folder Contents

windows/

  • lock_until_layer_key_once.py — Python script that uses pywinusb and keyboard modules.
  • task_scheduler_setup.md — Instructions for setting up as a background task using Task Scheduler.

macos/

  • init.lua — Hammerspoon config file.
  • install_instructions.md — Instructions for configuring Hammerspoon and Karabiner-Elements.

🚀 Setup Instructions

See individual platform folders for setup steps.


🧪 Compatibility

  • Designed specifically for Drop CTRL V1 keyboard:
    • Vendor ID: 0x04D8
    • Product ID: 0xEED2

You can modify the script to support other keyboards by changing those values.


📄 License

MIT License — use freely and modify as needed.

About

Auto-lock Drop CTRL keyboard input on USB switch (macOS + Windows)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors