How to trap key press in Forms6i?

Hi,
We have an Client/Server Application developed in Forms6i. The same application also runs over the web with 9i Application Server.
For some particular application requirement, we need to execute a routine
after every key pressed by the user in the text control. Hence we need trap every key thats pressed by the user.
Any help would be greatly appreciated.
Raj

You can do this on the Web Deployed one using a PJC - See the KeyFiler example in the Forms Demos (it's in the 9i demos and available for 6i as well)
For client server you'd have to look at an OCX for this.

Similar Messages

  • Trap Key pressed in Forms 10g.

    Hi All,
    Have anyone trapped the keys which are pressed in Forms 10g. We have a requirement in which in a LOV Form when TAB key is pressed it should navigate to the next field and when ENTER key is pressed it should select the value from that field and get back to the field from where it was invoked.
    We had tried http://forms.pjc.bean.over-blog.com/article-15980196.html from Francois Degrelle which traps he key pressed. But that is throwing us some error in JInitiator console.
    Expecting a favorable reply from the forum users on this to .
    Thanks in advance

    Monsieur Degrell,
    is it possible to listen just to one item in the form?
    I have triedSet_Custom_Property( 'b_hilfe.bean', 1, 'INIT', 'b_help.search');in when-new-form-instance, where 'b_help.search' is the item i want to listen to,
    but the bean still listen on every item in the form.
    kind regards

  • Capturing Key press when the focus is not on VI. (event is not working).

    I have a VI, and found similar in Forums. I need to catch key down event, when the focus is not on VI.
    I attached the VI found in forum. Try to click on other window, for example on block diagram of VI, when VI is running and check if it works. The answer is no, it doesn't work. When you press any key, the led button must change it's state, but it does only when the focus is on VI's front panel. The question is how to control key press, when VI is minimized or inactive. Is it possible to catch key down or any similar event, when the focus is on any other application, not on VI?
    Solved!
    Go to Solution.
    Attachments:
    simulatekeyevent.vi ‏16 KB

    Have a look at the "Connectivity...input devices..." menu.
    For an example, open the example finder and look for "basic input demo". It should give you some ideas. Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • How can we trape the Keys Pressed on the Keyboard and do action depending on the keys

    I want to know how we can capture the keys pressed on the keyboard by the user and do necessary action depending on the key pressed by the user....
    For example.... If user press Alt+q the form should go in the Enter Query Mode.
    Can anyone tell me how i can do this in Form 6i....
    Please Help me out from this problem...
    Thanks in Advance
    Shan

    Can somebody point me to what I need to use to
    intercept all the 'keys' for an application.
    At the moment I have set Focus to parts of the
    application when the Mouse is over it, and then get
    the Keys with a KeyListener.
    Is there a way to get the keys, as long as the Java
    app is active.
    - Its an image display program, and I want to use keys
    for - next image , zooom etc etc.
    If soemone could just point me to the right part of
    the API to look in?java.awt.Toolkit.addAWTEventListener()
    then use the mask defined in AWTEvent.KEY_EVENT_MASK to listen to all the events.
    Steve

  • How to trap the Delete Key..

    Hi
    I have implemented key handler for a text area and I want to do something when the delete key is pressed, but somehow the delete key press event is never trapped.
    Any ideas?? Here is the code:
    text_area.addKeyListener(new KeyAdapter(){
    public void keyTyped(KeyEvent e){
    if(e.getKeyCode() == e.VK_DELETE){
    System.out.println("This was deltete");
    I checked in the debugger....this method is never invoked for the delete key.
    How do I trap the delete key event??
    Thank you for your time.

    I agree. Something like:
    String actionName = DefaultEditorKit.deletePrevCharAction;
    final Action deletePrevCharAction = textpane.getActionMap().get(actionName);
    Action myAction = new AbstractAction()
    public void actionPerformed(ActionEvent e)
    System.out.println("Pressing backspace...");
    deletePrevCharAction.actionPerformed(e);
    textpane.getActionMap().put(actionName, myAction);
    mrai3

  • How to trap the first key?

    Hello World,
    I am using JTable in that I am using custom TextField as a Editor Component. Now I want to trap the first key pressed in the textfield.
    I am using public boolean editCellAt(int row,int column,EventObject e) method. In this method I get the value of �e� as a null if I press any key. So I can not trap the event here.
    The next try is to putting KeyListener in textfield class, this is also not working because it gets called after EditCellAt method.
    I tried to override the processKeyBinding() method but this seems to trap all the key pressed and not allow me to navigate also.
    Can anybody provide me the solution how I can trap the first key only.
    Thanks in advance,
    Sachin Dare.

    Hello World,
    I am using JTable in that I am using custom TextField
    as a Editor Component. Now I want to trap the first
    key pressed in the textfield.what do you want it for?
    [.. usual l aproaches snipped ]
    The reason this is not working is that JTable uses a very uncommon way to route this first keyEvent: it comes via Jtable.processKeyBindings which first tries to start the edit with it (buggily "forgetting" to pass the keyEvent along...) and if this started the edit it will pass both keyStroke and keyEvent to the editorComponent's processKeyBindings. At his time the editorComponent is part of the container hierarchy.
    So a possible solution (did not try it, though) might be to have a ComponentListener on the editorComponent, set a flag when being added to the table and reset the flag when receiving the first KeyStroke in proocessKeyBinding after the componentEvent. Alternatively, you might try to set/reset the flag as a clientProperty in table.processKeyBindings.
    Greetings
    Jeanette

  • How to get the actual key pressed in a UITextField

    Hi all , now i develop a program on iphone SDK 3.0 GM.
    I have an UITextField (created programmatically) and I have implemented the delegate as well as the UITextFieldTextDidChangeNotification so that I can react to changes in the text values.
    However, I specifically want to know when the user presses the backspace key in the UITextField when there is currently no text in the field. I can't find where I can get a specific notification of the actual key pressed, as opposed to the resulting state of the text. I'm sure there is a way to do this...help?

    I can imagine why you want to do it. I had the same problem myself and managed to circumvent it in a slightly painful way. What I did was to subclass UITextField to create a text field that always had text in it, even when it "seemed" empty. In fact the first character of the text is a space character, and then what follows is the actual text. In this way, your delegate will always get called about a backspace (when it's an attempt to delete the leading space character, obviously you should return NO in the textField: shouldChangeCharactersInRange: replacementString: method). I won't get into the details of exactly how to set everything up, like I said it is kind of elaborate and I wouldn't really recommend it unless you are desperate to have that kind of functionality.

  • How to pass the key pressed in javascript

    I'm asking this question here as I could not find the needed help elsewhere .
    I don't know how to pass the key pressed in the function on OnKeyPress event .
    I'm trying the following :
    <input type="text" name="a" onKeyPress="check();">
    I want to pass the key presses in the check function .
    How to collect the key pressed in the function check ?
    Thanks.

    As I said above, that won't work in Mozilla.
    In fact IMO Netscape/Mozilla javascript event handling has been behind IE since version 4.
    Be that as it may: here is a workaround (for Mozilla): It seems you have to assign the onkeypress event for it rather than declaring it as part of the textfield.
    Of the two textfields on this form, both work in IE, and only the first one will work properly in Mozilla. I left it in just to demonstrate the difference.
    And a couple of links for ya
    javascript forum: http://forums.webdeveloper.com/forumdisplay.php?s=&forumid=3
    Keypress events: http://www.din.or.jp/~hagi3/JavaScript/JSTips/Mozilla/Samples/KeyEvent.htm
    <html>
    <head>
    <script language="javascript" >
    <!--
    function check(evnt){
      alert("A key was pressed!");
      // IE handling
      if (window.event){
        evnt = window.event;
        alert(evnt.keyCode);
      // netscape/mozilla handling 
      else{
        alert(evnt.which);
    //-->
    </script>
    </head>
    <body >
    <form name="myform" method="post">
    Test <input type="text" name="myTest"><BR>
    Test <input type="text" name="myTest2" onKeyPress="check();"><BR>
    <script> document.myform.myTest.onkeypress = check; </script>
    </form>
    </body>
    </html>

  • KeyListener - how to handle series of key pressed

    Hi,
    Is there a way to handle a series of key pressed in the keyPressed(KeyEvent e) method. for instance, I want to popup a dialogbox when the user pressed: F9, 31, F9 ?
    thanks,
    chau

    Is there a way to handle a series of key pressed in
    the keyPressed(KeyEvent e) method. for instance, I
    want to popup a dialogbox when the user pressed: F9,
    31, F9 ?Look at the following.
    import java.awt.event.*;
    import javax.swing.*;
    /* http://forum.java.sun.com/thread.jspa?messageID=2900727 */
    /* http://forums.devshed.com/t218618/s.html */
    class KeyListenerDemo {
        public static void main(String[] args) {
            new KeyListenerDemo().go();
        void go() {
            JTextField field = new JTextField("Press a key, and watch the console.");
            field.setEditable(false);
            field.addKeyListener(new MyKeyListener());
            JFrame frame = new JFrame("KeyListener Demo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(field);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    class MyKeyListener extends KeyAdapter {
        public void keyTyped(KeyEvent e) {
            if (e.getKeyChar() == KeyEvent.VK_ESCAPE) System.exit(0);
            System.out.println("Typed: " + e.getKeyChar());
    }It shouldn't take too much imagination to figure out how to make the listener listen for that combination....

  • How to detect any key pressed for program running in the background?

    Hi All,
    is it possible to detect when any key is pressed if a java program is not in the focus? For example, when I have a console based program I can write something like:
    System.in.read();
    and wait until any key is pressed. However, if I move the mouse away from the console and make any other window active, the console program "doesn't hear" anything. Ok, it's clear, of course, but how is it possible to make the program detect any keys pressed even if it's running in the background?
    Thanks a lot for any hints!

    qnx wrote:
    1) Stop trying to make spyware. -> I don't do anything like this!
    2) Stop re-posting the same questions. -> didn't know they are the same, sorry.
    3) Stop taking us for fools. -> what? Honestly, I don't think that I realy deserved this :)With a limited posting history and the type of questions you are asking they are unusual.
    There are very few legitimate problem domains that would require what you are asking about. There are illegitimate ones though. And the legitimate ones would generally require someone with quite a bit of programming experience and would also be required (the fact that java can't do it would not get rid of the requirement.)
    Thus one might make assumptions about your intentions.

  • HT4211 I just updated my iPad 2 to iOS 7 and whenever I try to type on the keyboard screen, it takes several seconds to acknowledge the key press. It really is slow.How can I fix this?

    I just updated my iPad 2 to iOS 7 and whenever I try to type on the keyboard screen, it takes several seconds to acknowledge the key press. It really is slow.How can I fix this?

    Settings>General>Reset>Reset All Settings

  • How to binding a key press event of "Esc" to "cancle" button

    I create a class extended JComponent. Than I add a button named "cancle " to it.
    Than I add the class's instance to a JDialog object.
    I try to get the key press event through add a keyListener to the class instance, but no works.
    I try to add a keymap and action map to the dialog 's getRootPane() also no works.
    Who can tell me how can I do?

    Thats the way I did it:
        // map escape key
        ActionListener escapeActionListener = new ActionListener()
          public void actionPerformed(ActionEvent e)
            cancelPressed();
        this.registerKeyboardAction( escapeActionListener,
                                     KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false),
                                     JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );

  • How to handle form close event or escape key press event for user defined f

    Experts,
    Please let me know how to handle form close event or escape key press event for user defined form...
    Thanks & Regards,
    Pravin.

    Hi
    You can catch the form close event like this
    If ((pVal.FormType = 139 And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_CLOSE)) And (pVal.Before_Action = True)) Then
          Try
                   SBO_Application.SetStatusBarMessage(pVal.EventType.ToString())
          Catch ex As Exception
                    SBO_Application.SetStatusBarMessage(ex.Message)
            End Try
          End If
    Hope this helps
    Regards
    Arun

  • How to trap ALT key?

    Hello guys!
    After searching and investigating quite a lot, I am posting
    my problem here in hope that God bless me with success
    I am working on an eLearning course whereas client requied
    the course to be keyboard accessible. He wants all the shortcuts
    with Alt key combination.
    I can trap the Alt key with the use of enterframe but that
    makes my course processing heavy so I tried to trap Alt key with
    keylistener event but unfortunately keylistener event doesn't
    listen Alt key
    Could anyone suggest me how to trap Alt key without using
    enterframe or interval?
    Thanks a lot for sparing your precisious time.

    I believe Alt-Space is a keyboard shortcut in Windows XP to bring up the window menu for any app...so it's not just a LabVIEW thing. Further, it appears that Windows grabs that key combination before a LabVIEW event structure can get it.  I don't know any way around this behavior, since Windows appears to be taking matters into its own hands with certain key combinations.  My advice would be to use a different key combination for your app.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • How to trap ALT-Space key combo. ?

    Hi,
          Does anyone know how to trap Alt-space?  The user is probing a PC board and may want to keep their eyes on the work.  The space-bar makes a nice big "next" button, and the Alts on either side seem a natural choice for "back".  But, when I try to trap the Alt-key/space keyboard-event, the program nevers sees it.  Instead, a file dialog is displayed, as if Alt is trapped by the VI-menu-bar - which isn't even displayed!
    Cheers.
    When they give imbeciles handicap-parking, I won't have so far to walk!

    I believe Alt-Space is a keyboard shortcut in Windows XP to bring up the window menu for any app...so it's not just a LabVIEW thing. Further, it appears that Windows grabs that key combination before a LabVIEW event structure can get it.  I don't know any way around this behavior, since Windows appears to be taking matters into its own hands with certain key combinations.  My advice would be to use a different key combination for your app.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for

  • Order of to-dos in 6700

    Hello, In my Nokia 6700, the to-dos are sorted in no obvious order, seemingly almost random. Although I can select to sort them by "deadline" I then have to scroll up to the top of the list to see today's to-dos - very annoying. And the next time I g

  • Is there a way to link up my firewire 400 Audio I/O into USB3 or Thunderbolt?

    Hi all, I'm currently struggling trying to link my Firewire 400 Audio Interface to my new imac. There seems to have no easy way to link it up to either USB2/3 or Thunderbolt.? Cheers

  • Message Queue Blocking / MSGMNI Setting

    Hi All, Firstly, many thanks to all that can assists. I am currently getting Message Queue Blocking messages in my ULOG files in my Tuxedo Application. (Tux ver 7.1 in Unix). I am not sure what is causing this, but started to look into the Tux Config

  • Skipping Pages in Reports

    I have a report which has a simple select statemet 'select * from emp' .. Grouped by dept... and i gave maximum records per page =1 When im printing the report im printing on both sides of the page(A4 size).... My problem is i want to print each dept

  • Sql connection best practices

    Can someone discuss the pros and cons of setting your db connection in the web.xml and then using the following in a jsp; <sql:query var="myQuery">      SELECT * FROM mytable </sql:query>I find that it is quick and easy, but would I want to give this