ok, after 2 days, I finally solved the problem..by default steam stores, the file /lib/udev/rules.d/99-steam-controller-perms.rules

for some reason the retropie script also installs /ect/udev/rules.d/99-steam-controller-perms.rules

the file in /ect contained the instructions for xbox and keyboard which was overridding the /lib rules.
I removed the ect file which should not be there and everything is now working. (I actually removed both files and reinstalled steam-devices)