Skip to main content
Participating Frequently
June 17, 2022
Question

How would I use non-letter keys like Shift, Ctrl, F1, F2, F3 etc?

  • June 17, 2022
  • 2 replies
  • 210 views

Hi all,


Our system uses various Shift + (keys), or Shift + click and also F keys.

 

How would i use this in a simulation? I saw a post saying to just let the user press shift as it doesn't do anything, then the click on the button/box goes to the next slide. However if possible I would like to ensure the user presses Shift (or control). 

Is there an easy blog or video that would show me exactly how to enter this? I assume there would be a variable where it records that the Shift key was pressed? Or is it best to create a Javascript to record this?

 

Also when using the F keys, the browser overrides the simulation. Is there a way around this?

    This topic has been closed for replies.

    2 replies

    OH_CP_Lover_&_Hacker
    Inspiring
    June 17, 2022

    Hello, I'm crazy busy today, but I wanted to say that there are for sure ways to do what you are seeking.  I'm short on time, but I did want to share a JavaScript library that I've used for years to accomplish what you are seeking to do...and its very easy to use as well!  Please check out https://dmauro.github.io/Keypress/

    You can easily add this library to your Captivate project as an external file load

    I'll pop back on later to check any further messages here...

    RodWard
    Community Expert
    Community Expert
    June 17, 2022

    There are many situations like this where it is simply not possible to override the standard behaviour of the web browser that is viewing the content.  The software you are recording or simulating is built to use those keys the way it wants to.  But when you play HTML5 content in a web browser, the browser gets to see those keystrokes before the content does.  So if it already has some response programmed to happen on a given keystroke combination, you may not be able to over-ride that behaviour.

     

    In some cases it can be done usin JavaScript, but not necessarily possible in every case.