I set up XFCE with the slim display manager.
That made the keyboard and mouse work again -- I think something had gone wrong in the lightdm configuration.
After that I removed and re-installed lightdm and can now start that again with mouse and keyboard as well.
Not sure what was wrong which is a bit of a shame.
Good to have it working again though...