Skip to main content
abeardsl23
Inspiring
January 12, 2017
Question

Does Captivate 9 allow for customized keyboard shortcuts using Function Keys?

  • January 12, 2017
  • 2 replies
  • 663 views

Hello, all.  I have a need to trigger an action (go to next slide, Show image, etc.), but my users won't be using mice, but rather just their keyboard.

In our real world simulation, they'll need to press function keys in order to pass a skills test.  For the life of me, I can't get a click box to respond when assigning the F% function key as the shortcut.

Any advice?  It's GOT to be possible.

Thanks!

Adam

This topic has been closed for replies.

2 replies

Participating Frequently
January 17, 2017

This is a tricky one...and something that I haven't tried.

In theory, you could write some JavaScript to detect the key presses, set a Captivate variable in the JS and then call a Captivate action. I'll explain here, but I don't have time to try this out today.

W3Schools has an article showing how to attach the function to an object's onkeypress event. That article also suggests that this is widely supported in browsers. The DOM reference seems to say that the event will bubble all the way up to the DOM root, so you could attach to the document's onkeypress event.

Once you have the event trapped you can prevent the default action and cancel the bubble, which stops it reaching the browser interface. That way you can trap function key presses. There's a working HTML example All you need to do is pull it apart, pop the code into your Captivate project and wire it up to a Captivate action. It's not something for the lighthearted, but if this is really important then I'm sure that it can be done.

I started looking at this old post on Quirksmode, just in case you want to follow the train of thought.

If you do decide to make this work it would be great if you could post an update on how you get on.

Cheers, David

Captiv8r
Legend
January 12, 2017

Hi there

Whether function keys work will all depend on a combination of the function key you are trying to use as well as the method in which the user is viewing your Captivate.

For example, if the user is viewing the Captivate via the web browser (I'd guess that's the most common viewing mode) then certain function keys are always used for the browser operation and you cannot use them in Captivate.

That begs the question of why would Captivate allow me to choose these keys if they don't work?

Note that one output option is EXE. And in an EXE produced by Captivate, you are free to use those function keys and they should work just fine. Because at that point you are in the Flash player and not the web browser.

Cheers... Rick

abeardsl23
Inspiring
January 14, 2017

Thanks Rick!  This makes perfect sense. One follow up question:  Are all click boxes still captured and tracked in my LMS when published as .EXE?

Adam

RodWard
Community Expert
Community Expert
January 14, 2017

I think you will find the answer to this is NO.

Your LMS will not likely accept an EXE file as a SCORM.