Is it possible to redefine (monkeypatch) lookupAsciiCode to match other local

As it is already mentioned in the documentation, Macros.type assumes the QWERTY layout, but as far as I understand, that is only caused by the
Macros.lookupAsciiCode function that do that mapping, is it possible to monkeypatch that function to workaround that limit?

Can that be done within the ‘sketch’ (the ino file) without needing a custom plugin? How could that be done?