We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

detect ctrlKey

Home Forums Puzzles detect ctrlKey

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #56203
    noname
    Participant

    Hello everyone
    I would like to detect ctrl + mousewheel on my app and solve it with puzzle since its so fun.

    In Javascript its like:

    document.addEventListener("wheel", function(e){
    	console.log(e.ctrlKey);
    });

    First i’ll take the on mousewheel event block from html, but how do I get the KeyboardEvent.ctrlKey property then?

    :bye:

    #56205
    kdv77kdv
    Participant

    you can’t add any working ‘wheel’ event listener to window/document/body while zooming is enabled. e.preventDefault() ignores all of them. to make it work add an event listener to the v3d canvas

    #56213
    noname
    Participant

    oh okay thanks i’ll solve it with javascript then. Do you know how to use ‘in parent docs’ in javascript? I need to control a html-element in parent docs inside my listener.

    #56216
    kdv77kdv
    Participant

    parent.document

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.