Fix error on key press

Fixes #9471
3 jobs for master in 3 minutes and 48 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #9236
run-appdata

00:00:10

passed #9235
run-tests

00:03:25

 
  Build
passed #9237
run-build

00:00:11