Skip to content

Keypress ctrl #1286

Dec 12, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Hello.

No one else saved the day, so I decided to give this another shot.

if (event.key === 'Control'){

event.key is undefined when I hit CONTROL, but event.which is 17. So, I tried it this way, and it seems to work:

<!--Saved by Quest 5.8.6836.13983-->
<asl version="580">
  <include ref="English.aslx" />
  <include ref="Core.aslx" />
  <game name="Dragonoftheworld ctrl">
    <gameid>bbc8351c-21a2-4536-825f-467977bc61c2</gameid>
    <version>1.0</version>
    <firstpublished>2024</firstpublished>
    <feature_advancedscripts />
    <inituserinterface type="script">
      JS.eval ("var iskeyheld = false;  $('body').on('keydown', function(event) {    if (event.ctrlKey){      if (iskeyheld =…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Dragonoftheworld
Comment options

@KVonGit
Comment options

KVonGit Dec 21, 2024
Collaborator

Answer selected by Dragonoftheworld
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
2 participants