xkb: Fix off-by-one error in XKeycodeToKeysym

The code here that made indexes greater than 3 refer to XKB symbol
groups had an off-by-one error, so it would always leave out the symbol
that should have been at index 4. Rewrite the code to fix this and
simplify the logic a bit.

Signed-off-by: Adam Sampson <ats@offog.org>
4 jobs for keycodefix in 11 minutes and 18 seconds (queued for 5 seconds)
latest
Status Job ID Name Coverage
  Prep
passed check-commits #11499470

00:00:41

passed container-prep #11499471

00:02:43

 
  Build
passed build #11499472

00:08:07

 
  Deploy
passed check-merge-request #11499473

00:00:27