Skip to content

Repository files navigation

TabLock plugin for Notepad++

Русская версия

TabLock keeps Notepad++ focused on the current document while preserving safe typing and editing. It prevents accidental application switching, menu commands, window closing, and document changes.

What the plugin does

When enabled, TabLock:

  • locks the current document by its Notepad++ Buffer ID;
  • expands Notepad++ to a borderless topmost window on the current monitor;
  • hides the menu, toolbar, tab bar, and status bar;
  • allows normal typing, navigation, selection, undo, redo, and Select All;
  • optionally allows clipboard commands;
  • allows Save and autosave only when the locked document already has a file;
  • accepts a new or untitled document immediately, without a save question;
  • restores the locked document if another buffer is activated;
  • blocks common Windows shortcuts, function keys, unsafe Notepad++ commands, window closing, and clicks outside the protected window;
  • exits locked mode after Escape is held continuously for the configured time.

Keyboard and mouse low-level hooks run on dedicated message-loop threads. The plugin does not create network connections, collect telemetry, or start a separate process.

Important limitation

TabLock is a user-mode convenience feature, not a Windows security boundary. It does not replace Assigned Access, Family Safety, a restricted user account, AppLocker/WDAC, or other operating-system policies.

Ctrl+Alt+Delete, secure desktop, elevated tools, debuggers, automation, another input device, another desktop/session, or terminating/modifying Notepad++ can bypass the locked mode. The plugin is designed to prevent accidental input, not deliberate escape by an administrator or another process.

Installation

  1. Download TabLock-1.0-x64.zip from the Download section below.
  2. Close every Notepad++ window.
  3. Create %ProgramFiles%\Notepad++\plugins\TabLock if it does not already exist.
  4. Extract the single TabLock.dll file into that directory.
  5. Start Notepad++ and select Plugins > TabLock > Enabled.

To unlock, hold Escape continuously for five seconds. To uninstall, close Notepad++ and remove the TabLock plugin directory.

Configuration

TabLock works without a configuration file. To override the defaults, copy TabLock.ini.example to the Notepad++ plugin configuration directory as TabLock.ini.

Available settings:

  • EscapeHoldMs — unlock hold time, from 1000 to 30000 ms;
  • AutoSave — periodically save an existing file;
  • AutoSaveIntervalMs — autosave interval, from 1000 to 600000 ms;
  • AllowClipboard — allow Ctrl+C, Ctrl+X, and Ctrl+V;
  • DebugLog — emit technical events through OutputDebugString in debug builds.

The active values, version, license, and project link are shown under Plugins > TabLock > Settings / About....

Compatibility

  • Windows x64
  • Notepad++ x64
  • Tested with Notepad++ 8.9.7

Building

Requirements:

  • Windows x64;
  • CMake 3.21 or newer;
  • Visual Studio 2022 Build Tools, or MinGW-w64 with a resource compiler.

Visual Studio:

cmake -S . -B build -A x64
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure
cpack --config build/CPackConfig.cmake -C Release -B dist

MinGW-w64 with Ninja:

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

The generated release archive contains only TabLock.dll at its root.

License

TabLock is distributed under the GNU General Public License v3.0 or later. Third-party notices for the bundled Notepad++ and Scintilla interface headers are listed in THIRD-PARTY-NOTICES.md.

Download

GitHub Latest GitHub Downloads

About

Locks Notepad++ to the current document while preserving safe typing and blocking accidental app switching and unsafe commands.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages