User Tag List

Results 1 to 3 of 3

Thread: Disable arrow keys Scrolling

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    May 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Disable arrow keys Scrolling

    Is there a way to disable the arrow keys scrolling the web browser page in the Html5 module? As in using the arrow keys controls the game but up and down don't scroll.

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    tk22's Avatar
    Join Date
    Dec 2014
    Posts
    54
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    After building the game go to "src" folder then open "Runtime.js" and add this code at the bottom:

    window.addEventListener("keydown", function(e) {
    // space and arrow keys
    if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
    e.preventDefault();
    }
    }, false);

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2019
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot for that code @tk22 , it worked fine for me! I don't know why this is not a build-in HTML5 option in the proprieties.

    --

    ♥ Luv from GlitchyDust ♥

Similar Threads

  1. Arrow keys scrolling whole webpage
    By TastyPies in forum HTML5 Export Module 2.5
    Replies: 0
    Last Post: 24th October 2016, 05:26 PM
  2. Arrow keys for in-game movement a bad idea?
    By MTCMusic in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 29th April 2014, 10:15 AM
  3. Removing arrow keys to move
    By zitubia in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 13th December 2011, 05:27 AM
  4. Moogame moving without the arrow keys
    By dascribe in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 24th September 2007, 09:45 PM
  5. image editor change frame with arrow keys
    By thewreck in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st July 2006, 06:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •