check details in
https://github.com/spyder-ide/spyder/issues/3713
From replies
athlonshi commented on 4 Jul 2017
For those using Exceed X Server, you may also need to change Xconfig setting. Go to Xconfig --> Settings --> Protocol... --> Extensions --> check XKEYBOARD and save the settings.Oreki47 commented on 6 Oct 2017
I'm using TightVNC with Ubuntu 14.04.It works on my machine with:
export XKB_DEFAULT_RULES=base
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
The set rules has to come first.