Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6672951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:34:09+00:00 2026-05-26T03:34:09+00:00

Did I miss something or the Event.Keys object has gone from mootools since 1.4.0

  • 0

Did I miss something or the Event.Keys object has gone from mootools since 1.4.0 ?

I cannot get the real value of a key or compare it to the current pressed key :

var modifiers = {
    previous: Event.Keys.left,
    next: Event.Keys.right
};
switch (evt.code){
    case Event.Keys.backspace:
        // Do some stuff;
        break;
    case Event.Keys.delete:
        // Do some other stuff
        break;
}

Is ther a possibility this object has move to another object or property ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:34:10+00:00Added an answer on May 26, 2026 at 3:34 am

    erm. Under the new API changes, Event is now known as DOMEvent, a MooTools Type, not a Class. Additionally, event definitions are now private behind a closure in a keys array.

    https://github.com/mootools/mootools-core/blob/master/Source/Types/DOMEvent.js

    There is an API to work with it:

    DOMEvent.defineKeys({
        38: "up"
    });
    

    which, regretfully – is one way: You have no getter for the Event.Keys, you cannot set it w/o going through the API either.

    You can redefine them as per the source or store a local var of what they mean. You can also refactor it to puncture it.

    You can also do pseudo events, like keydown:left

    DOMEvent.definePseudo('left', function(split, fn, args){
        // args[0] is the Event instance
        if(args[0].key == 'left') fn.apply(this, args);
    });
    
    
    document.getElement("textarea").addEvent("keydown:left", function(e) {
        alert("left pressed!");
    });
    

    the alert above will only fire if you press the left arrow inside your textarea. Hope this helps…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did I miss something? I updated my iPhone to 5.1 and now Xcode won't
I didn't find it, yet. Did I miss something? I know a factorial method
http://jsfiddle.net/p57hm/ I simply want one more clone on each click. Did i miss something
Newbie ask: Did I miss something? Loaded scripts http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js http://extjs.cachefly.net/ext-3.2.1/ext-all.js Code Ext.onReady(function() { Ext.Ajax.request({
I run into follow problem. Did I miss anything? Association.all().count() 1 Association.all().fetch(1) [Association(**{'server_url': u'server-url',
Did I not get enough sleep or what? This following code var frame=document.getElementById(viewer); frame.width=100;
i am pretty new to the iOS world and since I'm coming from the
Did you used Dynamic websites before? you see its a good way for making
Did some searches here & on the 'net and haven't found a good answer
Did you ever have the following situation: you need to store information, but a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.