Skip to main content
Participating Frequently
December 30, 2017
Question

Keypress actions

  • December 30, 2017
  • 1 reply
  • 538 views

I have been trying to find a solution for this for a little while and maybe I don’t know what to search for but here is what I’m trying to do: I want to press a key on my keyboard and have shape or button look like it’s being pressed on the screen. Basically I would love to have a virtual keyboard mirror key presses on my keyboard. How would I do that?

    This topic has been closed for replies.

    1 reply

    Inspiring
    December 30, 2017

    There may be better ways to do this, but here is one possible option:

    1. Create objects ("keys") that have a Normal and a Pressed state. 

    2. Create transparent buttons that have a shortcut key assigned, e.g. Q

    3. Attach a simple action to each of these buttons that changes the state of the corresponding key object to Pressed, Delay the next action by xyz sec. and then change the state back to Normal.

    Here is a quick example with three keys: http://dev.keypointlearn.com/xcl76_CP/CP2018/VirtualKeyboard/

    Lilybiri
    Legend
    December 31, 2017

    Which version are you using? I would prefer to use shape buttons instead of combinations image + a button covering up the image (transparent buttons in the Captivate terminology are not transparent at all, they have a fill, a stroke and a label, but KeyPoiintLearn means a 'transparent' button with no fill and no stroke, could be a click box).  Especially if you are on Captivate 2017 and want to create responsive projects with Fluid Boxes, it is not possible to have an image covered by any interactive object at all. Filling a shape with that image, and turning it into a button is a better work flow since CP6. Take out the inbuilt states Rollover and Down: the button automatically will shrink when pressed. No need for an extra state at all. Use the shortcut key corresponsing with the letter as @KeyPointLearn describes. I suppose you will have to uncheck the option 'Continue Playing the Project' as well to avoid releasing the playhead after a press.

    Participating Frequently
    January 3, 2018

    yes I am on Captivate 2017