Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to activate the custom shorcut keys in <iframe> ??</iframe>

How to activate the custom shorcut keys in <iframe> ??</iframe>

Scheduled Pinned Locked Moved ASP.NET
questionjavascriptcomtutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VB 8 0
    wrote on last edited by
    #1

    Hi CP , I am using an iFrame in an application . i am setting focus to it to type the text . After typing some text i want to press the keys using combination like this :: " ctrl+shift+p " like what we do normally in iFrame i.e., Ctrl+X, Ctrl+V ,Ctrl+y ,Ctrl+C . I am using shortcuts.js JS File for generating normally it is working for textarea/ any control if it is having the focus. from the below site. http://www.openjs.com/scripts/events/keyboard\_shortcuts/#keys Untitled Page shortcut.add("ctrl+shift+p", function () { document.getElementById('<%=Button1.ClientID%>').click(); } ,{ //'type':'keydown', //'propagate':false, //'target':document.getElementById('ifrm') //} ); function LoadFrame() { document.getElementById("ifrm").contentWindow.document.designMode = "On"; //Registering the keydown event // frames[0].document.onkeydown = function () { // keypressed=frames[0].event.keyCode; // if(keypressed==80) // { // ctrlPressed = true; // return false; // } // if(keypressed==17) // { // shiftpressed = true; // return false; // } // if(keypressed==16 && ctrlPressed && shiftpressed) // { // short() // ctrlPressed=false; // shiftpressed=false; // return true; // } // return true; // }; // But this not the Exact way .& this is time taking for events to fire atleast 3 times for all buttons to be pressed. }

    This is the code which i am using currently . I want to use the keyboard shortcuts, if iframe is having the focus. I request to give the suggestions/output without leaving the question unanswered. Regards, Sriram.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups