Better keyboard detection when some of the keys are remapped, thanks to Lewis Wall