Here is my first attempt to write this question while I had the issue, because of the issue I was unable to click on the post question button:
I just woke my computer from sleep and my keyboard is not behaving
For example the modifier keys are reversed so pressing arrow left highlights text rather than moving the cursor I also have my capslock key reversed and I get a < when I try to type a comma and a > when I type a fullstop yet holding or not holding shift does not correct this
I have tried unplugging the keyboard and plugging it back in using a different USB port with no improvement
In the past the only solution Ive found is to reboot the system else Im stuck holding ctrl to click on links so they dont open in new windows etc
After restarting my computer I'm tempted to put the punctuation in above. Basically all the modifier keys ctrl, alt, shift, capslock had been reversed so that the lights and the key combinations did not work as expected, and using my computer became far more difficult. For example I could click on some text, and click elsewhere and it would select everything inbetween as fi I had held the shiftkey.
This has happened several times, always when I've woke my computer from sleep.