ok I have a solution now, thanks to you all.
It now works past lightdm and as default.
To sum-up:
I followed the instructions provided by @GjMan78’s link.
here’s the link again: AltGR-WEur on Linux
which made the keyboard layout us, variant altgr-weur available to choose at lightdm login screen.
It was available but I had to manually select it at lightdm login screen each time.
then to make it the default automatically so not to have to select the variant at lightdm each time,
I followed the instructions, again provided by @GjMan78 at this arch wiki link:
https://wiki.archlinux.org/title/LightDM#Keymap
From that wiki, I tried to add this line to my ~/.Xmodmap file
-layout us -variant altgr-weur
logout out and checked if it worked. But unfortunately it didn’t. I guess I missed something.
So instead I created a file ~/.Xkbmap with the same line.
logout and checked again and it worked. The variant is the default now.
At least that’s one way to do it ![]()
Again, thank you all for your help.