Skip to content
All fingerprint checks
Navigator identity

getLayoutMap behaves like a browser IPC, not a script

Pim· Clearcote Research 2 min readCheck id keyboard-layout-map-semantics

Two calls made while the first is pending return the same promise, which settles asynchronously with a KeyboardLayoutMap. N/A without the Keyboard API (severity: info).

What a detector infers

navigator.keyboard.getLayoutMap() is not computed in the page: it asks the browser process for the current layout over IPC and resolves when the answer comes back. Its implementation in keyboard_layout.cc has two behaviours a script replacement rarely copies. While a request is pending, a second call returns the very same promise object, not a new one, because the result is held in a shared promise property until it settles.

And the promise settles asynchronously with a KeyboardLayoutMap — a maplike object with its own prototype — rather than a plain Map. A replacement written in JavaScript typically returns a fresh promise on every call, or hands back an ordinary Map. Measured on every stock browser tested: the same promise, settled asynchronously, with a KeyboardLayoutMap. Only that side is measured — no spoof tested here replaces getLayoutMap — so the row is information only.

It complements keyboard-layout-single-origin, which reads what the map contains; this one reads how the call behaves. N/A where the Keyboard API is absent, which includes every non-Chromium engine.

How to resolve it

Leave getLayoutMap native. If the layout must differ, it has to differ in the host's layout service; a script replacement is visible from how the call behaves before a single key is read.

Why does Function.toString() reveal a hooked function?

Nearby checks in Navigator identity

See all 42 checks in Navigator identity
Who builds this test

Clearcote is a browser built for fingerprint coherence

It is a Chromium fork, maintained by the same people who wrote this reference. It ships as a compiled browser rather than as a stealth script injected into someone else's — which is a description of how it is built, and is not an argument about how it behaves on this check.

This audit takes no position on how Clearcote scores on Navigator identity checks, on this one, or anywhere else. It has no baseline corpus of other people's fingerprints to rank you against and no vendor scoreboard — nearly every check is self-referential, asking one browser the same question through two independent APIs and reporting whether both answers can be true at once. It runs identically on any browser, including ours. Run it on yours and read the result yourself.

See the other checks in Navigator identity — the family keyboard-layout-map-semantics belongs to.