Skip to content

Firefox's resistFingerprinting breaking Ctrl detection #231

Open
@NLZ

Description

In Firefox enabling privacy.resistFingerprinting in about:config breaks the detection of Ctrl because with the keydown event the modifier keys (ctrl, alt, shift) is silenced.
Testable with the following code from console:

document.addEventListener('keydown', function (e) {
  console.log(e.keyCode)
});

So with this the event for Ctrl (keyCode 17) and the other modifier keys are not firing.

But I found that with the click event it's still detecting the modifier keys:

document.addEventListener('click', function (e) {
  console.log(e.ctrlKey);
});

Hence my suggestion would be to consider switching the Ctrl using hotkeys to the click event if possible, as I suspect others also could run into this limitation.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions