Regarding closure of Help Screens on Escape Key.

Hi
I am using javax.help API to build help screens for my application.
Everything is working fine now I have a requirement to dispose the help window on escape key.
As soon as the help icon is clicked I am delegating the ActionEvent to CSH.DisplayHelpFromSource.
Now I need the help window in my hand to add keylistener and dispose it on escape.
Can anyone pleae help me out.
Thanks In Advance
Sharmila Tankala

//  Handle escape key to close the dialog
KeyStroke escapeKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
Action escapeAction = new AbstractAction()
     public void actionPerformed(ActionEvent e)
           setVisible( false );
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escapeKeyStroke, "ESCAPE");
getRootPane().getActionMap().put("ESCAPE", escapeAction);

Similar Messages

  • Regarding dispose of help screens on Escape.

    Hi
    I am using javax.help API to build help screens for my application.
    Everything is working fine now I have a requirement to dispose the help window on escape key.
    As soon as the help icon is clicked I am delegating the ActionEvent to CSH.DisplayHelpFromSource.
    Now I need the help window in my hand to add keylistener and dispose it on escape.
    Can anyone pleae help me out.
    Thanks In Advance
    Sharmila Tankala

    //  Handle escape key to close the dialog
    KeyStroke escapeKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
    Action escapeAction = new AbstractAction()
         public void actionPerformed(ActionEvent e)
               setVisible( false );
    getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escapeKeyStroke, "ESCAPE");
    getRootPane().getActionMap().put("ESCAPE", escapeAction);

  • Mod4 as escape key in screen?

    I was wondering whether and how the C-a combination in screen could be replaced by the "windows" key

    I have two 8900 curves on my desk.
    On one I do notice the escape key seems to have a "less deeper" push (doesn't travel as far as the Menu key).
    On the other, they feel to be about the same.
    So... I would say that is fairly normal.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • On iOS 5 for iPad, is there a home button key on the Apple Bluetooth Keyboard that will allow you to go to the home screen or multitask? Perhaps by pressing the escape key or something?

    On iOS 5 for iPad, is there a home button key on the Apple Bluetooth Keyboard that will allow you to go to the home screen or multitask? Perhaps by pressing the escape key or something?

    Sorry, but no one who would know can discuss unreleased software such as iOS 5 in these forums. We'll have to wait, probably for the official release, before such details will be known.
    Regards.

  • Remap Caps Lock as gnu screen escape key

    anyone know how to do this?
    currently ive got Caps Lock remapped to some keycode in /usr/share/X11/XKeysymDB
    i want to use it as the escape key for screen.
    adding it to .screenrc doesnt work.
    i was thinking that a macro or something that can just send C-a to screen when i push caps lock might work...?
    anyone have any thoughts?

    Look into loadkeys from the kbd package. I use it to exchange Escape/Caps_Lock outside of X.

  • Need help with adding a Key flex field to a seeded OAF page

    We have a seeded OAF page on which we already have Account Key Flex Field.
    Properties of this flex field are:
    The ApplShortName - SQLGL
    Name - GL#
    Type - Key
    As per the client requirement, in the KFF screen, we have disabled the seeded structure for Accounting Flexfield and created a custom structure.
    Our custom structure for the KFF is displayed correctly on the OAF page.
    But now the requirement is to add a new KFF on the OAF page which is duplicate of the existing KFF, along with the existing KFF field; the structure and segments are same. Only difference being the display name of the existing KFF field is Account; the new one needs to be Tax structure.
    Using personalization we added a new flex item and added the properties same as the existing KFF.
    ApplShortName - SQLGL
    Name - GL#
    Type - Key
    But the page is giving following error:
    The data that defines the flexfield on this field may be inconsistent. Inform your system administrator that the function: KeyFlexfieldDefinitionFactory.getStructureNumber could not find the structure definition for the flexfield specified by Application = SQLGL, Code = GL# and Structure number =
    We tried options like compiling the flexfield definition, but the error persists.
    Any help in this regard is highly appreciated.
    Regards,
    Kiranmayi.

    Hi,
    Please check whether your key flex structure is frozen or not. If now please freeze it and re compile and try.
    This may helps too
    error while developing KFF in oaf
    Thanks
    Bharat
    Edited by: Bharat on May 10, 2013 4:51 AM

  • How to get F4 help for Standard Text Key of a operation based on Order type

    Hi Experts,
      How to get F4 help for Standard Text Key (STK) of a operation based on Order type entered in selection screen. The F4 help should give the STK of related order type. At the same time the F4 help for Task Types based on Notification type. How to acheive the above two. Please provide the table names or any search help name if exists or Function modules...
    Thanks in Advance.
    Regads,
    Bujji

    Hi Guys,
       Any help on this...
    Regards,
    Bujji
    Edited by: Bujji on Dec 22, 2008 12:42 PM
    Edited by: Bujji on Jan 5, 2009 2:00 PM

  • JSF: How to bind a CommandButton functionaity to an ENTER or ESCAPE key?

    Hello!
    I use a JSF in my application. There are a lot of JSF Create - , Edit - and Delete - pages. All of this pages have to Command buttons:
    OK - which performs the action
    Cancel - which cancels the action.
    So, the problem is that it's necessary to bind an OK button action to an ENTER key and a Cancel button action to an ESCAPE key. The AccessKey property doesn't suite for this case, because it allows to work with literal keys only.
    Could anybody help me to solve a problem?
    Thanks in advance.

    For the ENTER key, you can define the property defaultCommand in the component af:form.<br><br>
    See "<a href="http://blogs.oracle.com/Didier/newsItems/departments/faces/2006/07/24#a102">ADF Faces: Submit a form with the Enter key</a>" for more details.<br>
    <br>
    Not sure about the ESCAPE key.<br>
    <br>
    Regards, <br>
    <br>
    Didier.<br>

  • Richt Click Mouse with user32.dll and String Constant for Escape Key

    Hi, could some one provide the input parameters to use with Mouse_Event function in user32.dll to Right Click the Mouse?   Also, what is the string constant to send if one want to type the Escape Key (Esc)?  
    I have searched this forrum but only find the parameters for Left Mouse Click.  Thanks for any help.

    Hi,
    The mouse_event function has been superseded by the sendinput command.  To learn more about the function calls with user32.dll, have a look at the msdn.com website.  The user32.dll website is shown here.  The syntax for the mouse_event function is shown below:
    Syntax
    VOID mouse_event(      
        DWORD dwFlags,
        DWORD dx,
        DWORD dy,
        DWORD dwData,
        ULONG_PTR dwExtraInfo
    );I hope this helps,
    Regards,
    Nadim
    Applications Engineering
    National Instruments

  • 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

  • Default behaviour of the Escape key while editing a cell in JTable??

    Hi all,
    i have a Jtable which get its data from an own model object which extends DefaultTableModel.
    If i overwrite the isCellEditable(row, col) method within the tablemodel object and set a specific column to editable, then i notice while editing a cell in that column that the default behaviour of the Escape key is that independet from what you have entered before in to the cell the editing stops and the cell gets the value it had before editing.
    This is the case for me even if i apply a custom editor to a column (one that extends DefaultCellEditor). It is just a JTextField that limits the number of digits a user can enter. Everything works fine. If the user edits the cell and presses ENTER or the "down arrow key" i can check what he has entered with the help of the getCellEditorValue() method. But if the user hits the ESC key after editing a cell this method is not invoked!!!
    My question is :
    is there any way to detect that the user cancels editing with the ESC-key.
    this is very important for me because if the user goes editing the cell i lock the related record in the database, if i cannot detect this it is locked till the application terminates.
    Thanks for any help in advance

    I try override the JTable editingCanceled() ==> does not work.
    I try the addCellEditorListener( CellEditorListener l ) ==> does not work.
    Finally, I try the addKeyListener ==> it works.
    Here is a quick demo. program:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class Test {
    public static void main(String[] args){
    JFrame f = new JFrame();
    String[] colName = {"a", "b"};
    String[][] rowData = {{"1", "2"}, {"3", "4"}};
    JTable table = new JTable(rowData, colName);
    JTextField t = new JTextField(10);
    t.setBackground(Color.red);
    t.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
    // do what ever you want ex. un-lock table
    System.out.println("ESCAPE");
    DefaultCellEditor editor = new DefaultCellEditor(t);
    TableColumnModel colModel = table.getColumnModel();
    for (int i = colModel.getColumnCount()-1; i >= 0; i--) {
    colModel.getColumn(i).setCellEditor(editor);
    f.setContentPane(new JScrollPane(table));
    f.pack();
    f.setVisible(true);

  • Regarding creation Of Help View

    Hi , Can Any body Tell me what is the step by Step Procedure how to create the Help View. Plz it's urgent .
    Thanks&Regards .
    Nihar.

    Help View ( SE54)
    Help views are used to output additional information when the online help system is called.
    When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
    Go thru this link plzz
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
    Difference between "Help View" and "Search Help"
    Reward points for useful Answers

  • How to Restrict Master data in value help screen for a user???URGENT

    Hello Gurus,
    I have a requirement.When a authorized user logins to view the report, he should see only list of customers assigned to that user in the value help screen, instead of displaying whole master data.and the data is displayed perfectly fine for the authorized sales rep. By default, Value help screen displaying all the customer numbers.
    How can I restrict in the value help screen?
    Any help appreciated with points.
    Regards,
    PNK

    Hi Chandran,
                I got that Idea too. I created a authorized customer, I created a authorized Object and assigned to a role.But in the role, when I am changing the object to generate profile, it is asking to select list of customers from the customer table.If the customers are always constant then this would work,  but in my scenario, customers for the sales rep changes over time and when I ever reps open the query, they should see updated list of customers assigned to them only, as we update the master data everyday from source system and that shud reflect in the value help.
    I am trying User Exit to achieve this, but I am not getting proper ideas how to do this.
    Any Help on this issue with user exit code???
    Thanks in Advance
    regards,
    PNK

  • My Escape key is not working

    Hi,
    I am Meena.
    I am doing a project using NetBeans and MS-Access.
    When I run my project a internal framed named login loaded on the jdesktoppane which in JFrame.
    So in the login internal frame i used two buttons one for Sign-in and another for sign out.
    So I combined the Sign-in button with Enter key and Sign-out button with Escape key by the following coding.
    I wrote the following coding in LoginInternalFrame->properties->enabled->advanced->Generate PreIntialization Code.
    Action EscFromLogin=new AbstractAction()
    public void actionPerformed(ActionEvent e)
        jButton2.doClick();
    Action OkFromLogin=new AbstractAction()
        public void actionPerformed(ActionEvent e)
           jButton1.doClick();
    getRootPane().getInputMap(jButton2.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0,false),"Esc_in_Login");
    getRootPane().getActionMap().put("Esc_in_Login",EscFromLogin);
    getRootPane().getInputMap(jButton1.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0,false),"Ok_in_Login");
    getRootPane().getActionMap().put("Ok_in_Login",OkFromLogin);In the above coding Enter key works well no problem.that is when I press the Enter key ,it combined with Sign-in button and works well.
    But when I press Escape key,it doesnot combined with Sign-off button.
    that is nothing is happening when I press Esc key.
    So i change the Escape key and test with F1 then F2 then F3 all are combined with Sign-off button and works well.But only the escape key is not working.
    But I have so many internal frames .In all internalframes my esc key works well.But not in the first inter frame(login internalframe)
    I couldnot understand the reason.
    Will you please help me to solve.
    Thank you so much.
    Meena

    mmm, i'm doing some tests and the case is working for me... The reason F1,F2 keys works while ESC don't is that some component is "eating" the ESC key. Probably your password textField, but it is not its default behaviour. For example, try to replace the textField with a FormattedTextField, write something into it and press ESC, this first ESC is consumed by the FormattedTextField, if you press ESC a second time the FormattedTextField not consume it, so the ESC keystroke processing is given to the rest of the componentes until one of they consume it (basically). So, how can you solve th problem? Try to determine which component is the "escape-eater". Once you detected it try to determine which properties are set and if this properties can alter the keyboard mapping. The problem can be difficult to repeat for us because the look and feel, java version, etc. can affect the system behaviour too. A global hook to ESC can also be the reason (maybe esc key it's not reaching ths components), try to override ProcessKeyBindings and log the results....

  • Problem to generate same VA01 search help screen in BDC Program

    Hi All,
              I have got one issue.
              The issue is that i need to generate the search (F4) help screen of VA01 search for articles in the program,.
              I tried to record using BDC, but the screen generated is different.
              Can anyone please guide me how to generate that same search help screen in Program using BDC or any other tool.

    Hi
    Just check the field in the VA01 for which you are using BDC , you may get the standard search help for that .
    It wuld be great if you elaborate your requierment .
    Regards
    Rahul

Maybe you are looking for