Use human-readable strings in preference to hard-coded integers
This is recommended by Qt docs.
See: https://doc.qt.io/qt-5/qkeysequence.html#details
Also this change avoids -Wdeprecated-enum-enum-conversion warnings.
Backport note: these deprecations become errors with Qt6
This is a backport of core#24624