Just an update - the problem got progressively more severe over days. So I ordered a new keyboard and replaced it. The issue has now gone. So it looks like this was a hardware issue. I have marked this bug report as invalid.
** Changed in: gnome-shell (Ubuntu) Status: Incomplete => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1922766 Title: UP and DOWN keys behave erratically To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1922766/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs