Hi Zoltan, Thanks for all your suggestions
I looked at the .xcfe logs but they did not mention the keyboard or mouse. Also, xfce4-goodies was already installed Touching wood it seems the problem is fixed now. Following http://tutorialforlinux.com/2017/01/18/how-to-switch-from-gnomegnome3-to-xfce-desktop-on-debian-8-jessie 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...