Can a Ctrl+mouse click trigger be created in Storyline? We are working on a software simulation where the learner must be able to select multiple items from a dialog box using this combination.
I don't believe it's currently possible to do this. You can assign another key with the CTRL key, but an "on click" trigger would be separate. For example, you could use a trigger for CTRL+Enter, or a trigger for a click, but not both. I do think this combination would make a great feature request, though
Could you assign a variable that changes when the user presses the CTRL button then add a condition to the mouse click saying "don't do this unless that variable is true" ? and then perhaps reset the variable to its initial state? Haven't tried it but mabye it would work.
Did you ever get this figured out? I am developing a software simulation with the same requirement for multiple object selection (Ctrl+mouse click). Any advice would be helpful.
This thread is a bit older, so you may want to send Ruby a private message to determine what she ended up doing. You can also follow Christine's suggestion to submit a feature request.
Hello. This is an old topic, but I found it is unsolved, and I was looking for a solution until few hours ago, so that's how I found it. I have solved this problem with a little bit of JavaScript, and my project is working perfectly.
I have written a small LinkedIn article about how to solve the problem, so you can preview it. I have also shared the javascript code and the .story file, so feel free to take a look at the details, and I hope you may find it helpful.
What I am trying to do is slightly different, so I think that won'T work for me: I need to change a Storyline Variable to value=true when the CTRL key is pressed and keep it at value=true as long as it is pressed and change it back to value=false as soon as the key is not pressed any longer.
Unfortunately I am no JS coder, I tried working with this, but it does not work:
eventTarget.addEventListener("keydown", (event) => { if (event.isComposing || event.keyCode === 17) { return; } var player = GetPlayer(); player.SetVar("isCTRLClicked",true); });
eventTarget.addEventListener("keyup", (event) => { if (event.isComposing || event.keyCode === 17) { return; } var player = GetPlayer(); player.SetVar("isCTRLClicked",false); });
Basic difference is in CTRL+clicking or just a check on a KeyEvent. Im no coder either...Google is your best friend and with a little search you can find anything.
Hello Stefan. The links are not working recently, I am trying to rebuild my website and I was not planning to include this sample on my website anymore. However, I will look for the files locally and share it with you soon.
12 Replies
Welcome to E-Learning Heroes, Ruby!
I don't believe it's currently possible to do this. You can assign another key with the CTRL key, but an "on click" trigger would be separate. For example, you could use a trigger for CTRL+Enter, or a trigger for a click, but not both. I do think this combination would make a great feature request, though
Could you assign a variable that changes when the user presses the CTRL button then add a condition to the mouse click saying "don't do this unless that variable is true" ? and then perhaps reset the variable to its initial state? Haven't tried it but mabye it would work.
Thanks for the feedback. This would definitely be a great built in feature. Randall your variable suggestion has got us thinking and it's worth a try.
Hi Ruby,
Did you ever get this figured out? I am developing a software simulation with the same requirement for multiple object selection (Ctrl+mouse click). Any advice would be helpful.
Hi Regina,
This thread is a bit older, so you may want to send Ruby a private message to determine what she ended up doing. You can also follow Christine's suggestion to submit a feature request.
Hello. This is an old topic, but I found it is unsolved, and I was looking for a solution until few hours ago, so that's how I found it.
I have solved this problem with a little bit of JavaScript, and my project is working perfectly.
I have written a small LinkedIn article about how to solve the problem, so you can preview it. I have also shared the javascript code and the .story file, so feel free to take a look at the details, and I hope you may find it helpful.
Link to the article: https://www.linkedin.com/pulse/ctrl-click-select-many-shift-trigger-software-marko-stojkovski?published=t
I have also created a post on my webpage, with the same content, so here is another link to the same solution: http://www.enaspot.com/?portfolio=ctrl-click-trigger-select-many-in-software-simulation
Thanks for popping in to share Marko :)
Hi Marko,
Unfortunately the links on your website are dead, would you mind sharing the .story and .js file again here on elearning heroes?
Hi Stefan,
This is your solution.
https://360.articulate.com/review/content/c395fe88-f401-4f57-baed-cf579b68c039/review
And here is the .story for it.
Kind regards,
Math
Hi Math,
Thank you, I am impressed, that looks great.
What I am trying to do is slightly different, so I think that won'T work for me: I need to change a Storyline Variable to value=true when the CTRL key is pressed and keep it at value=true as long as it is pressed and change it back to value=false as soon as the key is not pressed any longer.
Unfortunately I am no JS coder, I tried working with this, but it does not work:
eventTarget.addEventListener("keydown", (event) => {
if (event.isComposing || event.keyCode === 17) {
return;
}
var player = GetPlayer();
player.SetVar("isCTRLClicked",true);
});
eventTarget.addEventListener("keyup", (event) => {
if (event.isComposing || event.keyCode === 17) {
return;
}
var player = GetPlayer();
player.SetVar("isCTRLClicked",false);
});
Basic difference is in CTRL+clicking or just a check on a KeyEvent. Im no coder either...Google is your best friend and with a little search you can find anything.
Here is your fix.
Hello Stefan. The links are not working recently, I am trying to rebuild my website and I was not planning to include this sample on my website anymore.
However, I will look for the files locally and share it with you soon.