I know this isn't exactly what you're looking for, but it's an option I've used before when trying to simulate a keyboard issue using an authoring tool that didn't really support that...What you could do is to include a graphic of a keyboard and have the user click on the right key on the graphic, rather than use the real keyboard. Although it's not a completely faithful simulation of real life, it does allow the learners to validate whether they know what the right key to push would be.Hope this helps!