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

  • SEARCH
  • Home
  • 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 6682489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:42:45+00:00 2026-05-26T04:42:45+00:00

i was wondering how do i trigger the event keyCode composed by Ctrl+z and

  • 0

i was wondering how do i trigger the event keyCode composed by Ctrl+z and the event keycode composed by Ctrl+Shift+z ?

  • 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-26T04:42:45+00:00Added an answer on May 26, 2026 at 4:42 am

    If you want to trigger the event then it should be something like this:

    HTML

    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>
      <input type=button value=CTRL+SHIFT+Z id=bcsz />
      <input type=button value=CTRL+Z id=bcz />
      <textarea id=t ></textarea>
    </body>
    </html>
    

    JavaScript

    var t = document.getElementById('t'), //textarea
        bcsz = document.getElementById('bcsz'), //button ctrl shift z
        bsz = document.getElementById('bcz'),  // button ctrl z
        csz = document.createEvent('KeyboardEvents'), //ctrl shift z event
        cz = document.createEvent('KeyboardEvents'); // ctrl z event
    
    csz.initKeyboardEvent(
               'keydown', 
               true,     // key down events bubble 
               true,     // and they can be cancelled 
               document.defaultView,  // Use the default view 
               true,        // ctrl 
               false,       // alt
               true,        //shift
               false,       //meta key 
               90,          // keycode
               0
              );  
    cz.initKeyboardEvent(
               'keydown', 
               true,     // key down events bubble 
               true,     // and they can be cancelled 
               document.defaultView,  // Use the default view 
               true,        // ctrl 
               false,       // alt
               false,        //shift
               false,       //meta key 
               90,          // keycode
               0
              );  
    
    bcz.addEventListener('click', function(){
      t.dispatchEvent(cz); 
    }, false);
    
    bcsz.addEventListener('click', function(){
      t.dispatchEvent(csz); 
    }, false);
    

    LOOK AT JSBIN LINK

    But it seems it doesn’t works. I don’t have more time to spend on this, but yeah this is kind of a security issue. I would see these docs at MSDN, W3C and MDN to see if there is a real way to do this.

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

Sidebar

Related Questions

Wondering if there is a way I could trigger an event, so that any
I was wondering if anyone knows of a way to trigger an event when
I've a parent (Canvas) with many children (LinkButtons) The linkButtons trigger an event to
I'm wondering, is it possible to somehow map a key-press event to act like
I'm wondering if it's possible to use jQuery's bind() to fire a custom event
I have a custom event I've made which I would like to trigger at
I want to trigger the submit event of the form the current element is
i have: ListenCheckedListBox.SetItemCheckState(0, CheckState.Unchecked); will this assignment trigger the ListBox's ItemCheck event? because the
I am wondering if there is a way to trigger a procedure by a
Wondering if anyone has gotten the infamous database is locked error from Trac and

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.