Fix key mapping to a valid value on Windows