Results 1 to 8 of 8
  1. #1
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    150
    Rep Power
    7

    Default How to Disable the ctrl + keys using java

    Hi Folks,

    in my application i have disabled the right click option for security reasons.

    i would like to disable the mouse scroll button click (ctrl+mouse left click functionality) which should not be open a new window.

    any suggestions please....

    regards,
    bharath

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default

    Are you talking about in the browser?

  3. #3
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    150
    Rep Power
    7

    Default

    Its a Web application which needs security.For that i have disabled the right click option.
    But if the mouse have any scroll button(middle click) which functions as the ctrl+click with keyboard ,opens the link in a new browser.I want to disable that.Any Help..

    Regards,
    Jazz

  4. #4
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    150
    Rep Power
    7

    Default

    i have been trying at last got some success
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    <SCRIPT LANGUAGE="JavaScript">
    <!--

    document.onkeydown = function(ev) {
    var key;
    ev = ev || event;
    key = ev.keyCode;
    if(key == 17)
    this.disabled=true;
    }
    //-->
    </SCRIPT>
    </HEAD>

    <BODY><a href="http://www.google.com">click here</a>

    </BODY>
    </HTML>
    but how to disable with middle click of the mouse:-(

  5. #5
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    This is a Java programming language forum, not a Javascript browser scripting forum...

  6. #6
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    150
    Rep Power
    7

    Thumbs down

    Thnx..even i want to know for the soln:-)

  7. #7
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    Please try a Javascript forum.

  8. #8
    jazz2k8's Avatar
    jazz2k8 is offline Senior Member
    Join Date
    Apr 2008
    Posts
    150
    Rep Power
    7

Similar Threads

  1. Write ctrl-z characters
    By jithan in forum New To Java
    Replies: 3
    Last Post: 02-18-2009, 03:11 AM
  2. How to store keys in KeyStore use java code
    By lc666111 in forum Advanced Java
    Replies: 1
    Last Post: 09-29-2008, 08:25 PM
  3. Classpath is broken after Ctrl+S
    By vetalok in forum Eclipse
    Replies: 2
    Last Post: 08-18-2008, 10:35 AM
  4. Run method on Ctrl+Shift+D
    By Echilon in forum AWT / Swing
    Replies: 1
    Last Post: 02-16-2008, 10:31 PM
  5. how to issue the command of Ctrl-C (copy) in Java
    By bilal_ali_java in forum Advanced Java
    Replies: 0
    Last Post: 07-18-2007, 03:14 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
  •