PowerToys/doc/devdocs/core/settings/communication-with-modules.md
Gleb Khmyznikov 725535b760
Some checks failed
Spell checking / Check Spelling (push) Has been cancelled
Spell checking / Report (Push) (push) Has been cancelled
Spell checking / Report (PR) (push) Has been cancelled
Spell checking / Update PR (push) Has been cancelled
[DevDocs] More content and restructure (#40165)
## Summary of the Pull Request
Accumulated information from internal transition about the modules
development, and reworked it to be added in dev docs. Also the dev docs
intself was restructured to be more organized. New pages was
verified by transition team.

## PR Checklist
- [x] **Dev docs:** Added/updated

---------

Co-authored-by: Zhaopeng Wang (from Dev Box) <zhaopengwang@microsoft.com>
Co-authored-by: Hao Liu <liuhao3418@gmail.com>
Co-authored-by: Peiyao Zhao <105847726+zhaopy536@users.noreply.github.com>
Co-authored-by: Mengyuan <162882040+chenmy77@users.noreply.github.com>
Co-authored-by: zhaopeng wang <33367956+wang563681252@users.noreply.github.com>
Co-authored-by: Jaylyn Barbee <51131738+Jaylyn-Barbee@users.noreply.github.com>
2025-07-01 14:27:34 +02:00

1.2 KiB

Communication with modules

Through runner

  • The settings process communicates changes in the UI to most modules using the runner through delegates.
  • More details on this are mentioned in runner-ipc.md.

PT Run

  • Any changes to the UI are saved by the settings process in the settings.json file located within the /Local/Microsoft/PowerToys/Launcher/ folder.
  • PT Run watches for any changes within this file and updates its general settings or propagates the information to the plugins, depending on the type of information. Eg: The maximum number of results drop down updates the maximum number of rows in the results list which updates the general settings of PT Run whereas the drive detection checkbox details are dispatched to the indexer plugin.

Keyboard Manager

  • The Settings process and keyboard manager share access to a common default.json file which contains information about the remapped keys and shortcuts.
  • To ensure that there is no contention while both processes try to access the common file, there is a named file mutex.
  • The settings process expects the keyboard manager process to create the default.json file if it does not exist. It does not create the file in case it is not present.