Which key is pressed

what is the best way to khow which key off keyboard is presses?
regards
esmat.

There is no native functionality in forms to do this - but if you are web deployed you can write a PJC to provide this information - see the KeyFilter sample available for Download from the Forms samples pages on OTN

Similar Messages

  • Just bought an iMac put in password do not know which key to press to get started

    Just bought an iMac, it is setup asked to put in password which I have done now do not know which key to press to get started.

    Mac 101:  Get Started Using A Mac 

  • Getting which key is pressed without adding keylistener

    I need to get which key is being currently pressed in valuechanged of treeselection event. i need to know which key is pressed before executing the code for treeselection event

    1. In the future, note there is a Swing forum exactly for questions like this, questions about Swing:
    http://forum.java.sun.com/forum.jspa?forumID=57
    2. Can you explain your problem better?
    Demo:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class KeyEventExample implements Runnable, KeyListener, TreeSelectionListener {
        @Override public void run() {
            JTree tree = new JTree();
            tree.addKeyListener(this);
            tree.addTreeSelectionListener(this);
            JFrame f = new JFrame("KeyEventExample");
            f.getContentPane().add(new JScrollPane(tree));
            f.pack();
            f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        @Override public void keyPressed(KeyEvent evt) {
            System.out.println("keyPressed " + evt.getKeyCode());
        @Override public void keyReleased(KeyEvent evt) {
            System.out.println("keyReleased " + evt.getKeyCode());
        @Override public void keyTyped(KeyEvent evt) {
            System.out.println("keyTyped " + evt.getKeyChar());
        @Override public void valueChanged(TreeSelectionEvent evt) {
            System.out.println("valueChanged " + evt.getPath());
        public static void main(String[] args) {
            EventQueue.invokeLater(new KeyEventExample());
    }

  • How can i know which key i pressed?

    i defined F9,F10 as previous Item using Oracle Terminal.after the programme is executed,the user can use the function of Previous item,how can i know the key user pressed is F2 or F3?

    What's the big deal having more than one key to perform the same task? I don't believe I understood you properly....
    For instance, if you don't want end-users to press Ctrl+K to invoke LOV, one option is to "disable" this key combination using Oracle Terminal.
    Other option is the Keybidding API may help you. Look for it in Forms Builder Help. I don't think so, but maybe it could be usefull help...

  • How to find out which keys are pressed while a d&d drop occurs?

    Hi,
    while an item is dropped as part of a drag and drop operation, I would like to know if the user has pressed any keys.
    I use a TransferHandler for managing the d&d and this works fine with the system dependent modifier keys for move, copy and link. But as my application needs to perform special actions if, for example, 'p' is pressed while a drop occurs, I'm stuck:
    It looks like there is neither a way to poll for pressed keys [like Keyboard.isPressed('p')] nor are there any key events fired as long as the d&d operation is active.
    I've tried a adding a key listener, adding a key binding and using the KeyboadFocusManager but nothing seems to work.
    Any ideas?
    Thanks,
    Norb

    Hi,
    the question is where the focus would be - because as you know unless there is a record in InputMap and keys are usually only received by focused component anyway. I'd recommend hooking into Swing event queue, something like that:
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(new EventQueue() {
        protected void dispatchEvent(AWTEvent event) {
            if (event instanceof KeyEvent && dragging) {
                // do something
    });

  • Keyboard only produces numbers and symbols regardless of which key is pressed.  Is there another option to deleting all and reloading Bootcamp?

    Repetitive pressing of one keyboard key produces different varied numbers and symbols.

    I actually ran into this same issue and created a standalone app that restores the Snow Leopard functionality. It seems to be a bug in the current implementation, hopefully Apple fix it soon.
    Check out my blog for the info and the download: http://nickbona.com/blog/2011/12/12/speak-selected-text-in-os-x-lion.html
    If you find it useful, feel free to share it with as many people as you'd like, just please post a link to that posting.
    Nick

  • My G4 powerbook starts up but with a black screen. The reset button does not work. Does anyone know the keys to press on restart please ?

    My G4 powerbook running OSX 10.3.9 starts up with  a black screen. The reset button is not working. Does anyone know which keys to press on restart please.?

    Try holding the shift key while booting to get Safe mode if possible.
    See links for more info.
    http://support.apple.com/kb/ht1564
    http://support.apple.com/kb/ht1455

  • IPhone letters don't pop up when keys are pressed

    You know how the letters pop up from under your finger when keys a pressed on the keyboard to let you know which key you press, well sometimes certain letters on my keyboard stop popping up. A restart fixes the key but a few minutes or hours (intermittent) later a different letter stops working. Anybody else have this problem?

    The problem seems to be related to the Auto-correct and Auto-capitalization feature. If I turn either one off (Settings->General->Keyboard), I don't have the problem but when both are on, it comes back. It also seems to affect the first character that I type in the input field.
    With both Auto features on, if I go to the login page of Twitter and type, say, a 'v' as the first character of the Username, a capital V is entered and the "V" pops up, but if I backspace, tap shift to go to lowercase and tap v again, the v does not pop up from the keyboard but it does show up in the username input field. I can reset things if I tap the Done button on the keyboard then tap in the username field to bring the keyboard back up. The problem is still there, but I can see it happen with a new letter if I want.
    Try it and post what you find. You don't have to have a Twitter account to see it happen and I'd be interested to know if it's consistent.

  • I have forgotten which key I need to press to offer the option of switching from Windows 7 to Mac os. Can anybody help?  Many thanks.

    Can anybody advise me on which key I need to press on start up to be given the option of switching from Windows 7 to Mac OS?
    Many thanks.
    John

    "option"

  • Which keys do I have to press for pagination shortcut in pages?

    Hi,
    I'd like to use the shortcut for pagination shown in pages. It looks like this:
    Can you tell me which key that is?
    Best
    Sarah

    No, I'm not talking about iTunes.  The music icon is orange with a dark brown series of notes.  It should be in thel lower right side of your home screen.
    If it's not there, you might try Settings > General > Reset > Reset home screen layout.

  • I have an MacBook Air, which keys do i use to connect it to a projector

    Which keys do I use to connect my MacBook to a projector

    When you physically connect the mac to a projector (which is turned on), it should automatically detect the projector and configure itself.  This can take a second or two. 
    System Preferences, Displays will provide you with a few options on how the external display will behave (e.g., mirrored).
    In the Display preferences if you press the option key a button "Detect displays" will appear which will allow you to manually force the computer to connect to a display.

  • No key event when compose keys are pressed

    I am supporting a legacy application for Sabre which maps some of the keys differently. For example, on a French keyboard the Compose key which is used to put a ^ on top of the vowel characters is to be remapped to produce a special character called a "Change Character" that has a special use for reservation agents that use Sabre
    The problem is, the first time you press the ^ compose key there is no key event apparently because the VM figures it doesn't yet know what key to report, it is expecting you to press a character such as 'o' and then you get an 'o' with a '^' on top of it.
    If you press the ^ compose key a second time, you get the following key events:
    keyPressed
    keyTyped
    keyTyped
    keyReleased
    On the screen you will see two ^ characters appear. Currently I remap the ^ character to the "Change Character", and I suppress the second keyTyped event so that I only get one character. The problem is that the user ends up having to press the key twice to get one "Change Character."
    I have no fix for this problem because there is no key event produced when they press the ^ compose key the first time.
    By the way, this behavior appears to have been introduced with jdk 1.3. The older jdk did produce a key event the first time you pressed the compose key. I would expect that this behavior was considered to be a bug and was fixed in jdk 1.3.
    Is there some other way to detect when the user presses a compose key? If not, is it possible for future jdk releases to report a keyPressed event when a compose key is pressed? This event would not cause a character to appear on the screen, but would allow programs to detect when the compose key is pressed.
    There is already a key on the French keyboard that behaves this way. It is the key to the left of the '1' key and it has the pipe symbol on it. If you press Shift plus this pipe key, no character is produces but a keyPressed event with a keycode of 222 is produced. I merely point this out to show that there is a way to report key events whithout producing output on the screen.
    Thanks, Brian Bruderer

    I don't know if this actually helps, but it seems that you can bind an Action to a dead key like the circumflex of the French keyboard
    Keymap keymap = textPane.addKeymap("MyEmacsBindings", textPane.getKeymap());
    Action action = getActionByName(DefaultEditorKit.beginAction );
    KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_DEAD_CIRCUMFLEX);
    keymap.addActionForKeyStroke(key, action);I saw this on a Swing tutorial and modified it slightly. Have a look at it :
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
    Chris

  • Thinkpad keyboard problem - some keys generate multiple keys when pressed

    thinkpad keyboard problem - some keys generate multiple keys when pressed
    For example, "t" generates "tr", "y" generates "yu", "backspace" generates "backspace" plus "IBM access connections", "m" generates "mn" and "n" generates "mn".  Not all keys are wrong. 
    For what it's worth, the odd behaviour started shortly after a trip to Miami in which I had a meeting at a cafe in which we were undercover but it was pouring cats and dogs - it was like having a meeting in a sauna - so I am wondering if the high humidity could have caused the behaviour.
    I tried replacing the keyboard but the new keyboard has the same problem.  
    The machine in question is a Thinkpad T23 running Windows XP Pro
    Any help would be appreciated as I am now in Los Angeles using a borrowed Mac! :-) 

    i have something along the lines of the same problem.
    http://bbs.archlinux.org/viewtopic.php?id=56777
    my conclusion is something in the last system update screwed it up.

  • How come multiple audiotags in ebook can play all together in the last version of ibooks and ios6 while before they fade eachother when play key is pressed ?

    in ipad1 with ios5.1.1 and latest ibooks app audiotags stop the last music played when the new music starts
    in ipad3 with ios6 and latest ibooks let all the music play together with a resulting mess
    in ipad2 with ios6  ibooks fade the last tag that is playing when the play key is pressed in the new audiotag

    Gah. So It looks like the first version of the song on your iPod is the definitive version of a song (as is the case in iTunes). So in order to ensure that the version you want plays, you have to:
    1. make that the only version in iTunes (or first in the file structure)
    2. update Genius
    3. sync your iPod
    BOO. Too much work (I'm still going to do it though...)
    I would really like a feature that allowed you to specify which song would be chosen (the existing rating system would seem to be easiest).
    Another solution I thought of still requires a lot of work. This is assuming you prefer It would go something like this:
    1. Create an directory structure at the root of your library that would prioritize tracks, such as:
    a) Albums (for full length albums)
    b) Collections (for best ofs etc.)
    c) EPs (for singles or remix albums)
    e) Live Performances
    -assuming you prefer album versions over remixes over live versions, or more directly:
    a) High Priority
    b) Low Priority
    2. Place Each Album or individual tracks in their appropriate folder.
    3. Reset your iPod
    4. Sync
    The directory structure will intrinsically place higher priority versions on you iPod first, making them a priority version there. Pain in the...

  • Default button being clicked multiple times when enter key is pressed

    Hello,
    There seems to be a strange difference in how the default button behaves in JRE 1.4.X versus 1.3.X.
    In 1.3.X, when the enter key was pressed, the default button would be "pressed down" when the key was pressed, but wouldn't be fully clicked until the enter key was released. This means that only one event would be fired, even if the enter key was held down for a long time.
    In 1.4.X however, if the enter key is pressed and held for more than a second, then the default button is clicked multiple times until the enter key is released.
    Consider the following code (which is just a dialog with a button on it):
    public class SimpleDialog extends JDialog implements java.awt.event.ActionListener
    private JButton jButton1 = new JButton("button");
    public SimpleDialog()
    this.getContentPane().add(jButton1);
    this.getRootPane().setDefaultButton(jButton1);
    jButton1.addActionListener(this);
    this.pack();
    public void actionPerformed(ActionEvent e)
    if (e.getSource() == jButton1)
    System.out.println("button pressed");
    public static void main(String[] args)
    new SimpleDialog().show();
    When you compile and run this code under 1.3.1, and hold the enter key down for 10 seconds, you will only see one print line statement.
    However, if you compile and run this code under 1.4.1, and then hold the enter key down for 10 seconds, you will see about 100 print line statements.
    Is this a bug in 1.4.X or was this desired functionality (e.g. was it fixing some other bug)?
    Does anyone know how I can make it behave the "old way" (when the default button was only clicked once)?
    Thanks in advance if you have any advice.
    Dave

    Hello all,
    I think I have found a solution. The behaviour of the how the default button is triggered is contained withing the RootPaneUI. So, if I override the default RootPaneUI used by the UIDefaults with my own RootPaneUI, I can define that behaviour for myself.
    Here is my simple dialog with a button and a textfield (when the focus is NOT on the button, and the enter key is pressed, I don't want the actionPerformed method to be called until the enter key is released):
    package focustests;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    public class SimpleDialog extends JDialog implements java.awt.event.ActionListener
    private JButton jButton1 = new JButton("button");
    public SimpleDialog()
    this.getContentPane().add(new JTextField("a text field"), BorderLayout.NORTH);
    this.getContentPane().add(jButton1, BorderLayout.SOUTH);
    this.getRootPane().setDefaultButton(jButton1);
    jButton1.addActionListener(this);
    this.pack();
    public void actionPerformed(ActionEvent e)
    if (e.getSource() == jButton1)
    System.out.println("button pressed");
    public static void main(String[] args)
    javax.swing.UIManager.getDefaults().put("RootPaneUI", "focustests.MyRootPaneUI");
    new SimpleDialog().show();
    and the MyRootPaneUI class controls the behaviour for how the default button is handled:
    package focustests;
    import javax.swing.*;
    * Since we are using the Windows look and feel in our product, we should extend from the
    * Windows laf RootPaneUI
    public class MyRootPaneUI extends com.sun.java.swing.plaf.windows.WindowsRootPaneUI
    private final static MyRootPaneUI myRootPaneUI = new MyRootPaneUI();
    public static javax.swing.plaf.ComponentUI createUI(JComponent c) {
    return myRootPaneUI;
    protected void installKeyboardActions(JRootPane root) {
    super.installKeyboardActions(root);
    InputMap km = SwingUtilities.getUIInputMap(root,
    JComponent.WHEN_IN_FOCUSED_WINDOW);
    if (km == null) {
    km = new javax.swing.plaf.InputMapUIResource();
    SwingUtilities.replaceUIInputMap(root,
    JComponent.WHEN_IN_FOCUSED_WINDOW, km);
    //when the Enter key is pressed (with no modifiers), trigger a "pressed" event
    km.put(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER,
    0, false), "pressed");
    //when the Enter key is released (with no modifiers), trigger a "release" event
    km.put(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER,
    0, true), "released");
    ActionMap am = SwingUtilities.getUIActionMap(root);
    if (am == null) {
    am = new javax.swing.plaf.ActionMapUIResource();
    SwingUtilities.replaceUIActionMap(root, am);
    am.put("press", new HoldDefaultButtonAction(root, true));
    am.put("release", new HoldDefaultButtonAction(root, false));
    * This is a copy of the static nested class DefaultAction which was
    * contained in the JRootPane class in Java 1.3.1. Since we are
    * using Java 1.4.1, and we don't like the way the new JRE handles
    * the default button, we will replace it with the old (1.3.1) way of
    * doing things.
    static class HoldDefaultButtonAction extends AbstractAction {
    JRootPane root;
    boolean press;
    HoldDefaultButtonAction(JRootPane root, boolean press) {
    this.root = root;
    this.press = press;
    public void actionPerformed(java.awt.event.ActionEvent e) {
    JButton owner = root.getDefaultButton();
    if (owner != null && SwingUtilities.getRootPane(owner) == root) {
    ButtonModel model = owner.getModel();
    if (press) {
    model.setArmed(true);
    model.setPressed(true);
    } else {
    model.setPressed(false);
    public boolean isEnabled() {
    JButton owner = root.getDefaultButton();
    return (owner != null && owner.getModel().isEnabled());
    This seems to work. Does anyone have any comments on this solution?
    Tjacobs, I still don't see how adding a key listeners or overriding the processKeyEvent method on my button would help. The button won't receive the key event unless the focus is on the button. There is no method "enableEvents(...)" in the AWTEventMulticaster. Perhaps you have some code examples? Thanks anyway for your help.
    Dave

Maybe you are looking for

  • HOW TO OPEN AND SAVE FILES TO/FOR MS-WORD 2007 .docx format

    MS-Office 2007 will open .docx files as well as .doc files. Apple's Pages '08 can OPEN MS Word 2007 documents with the new file format ".docx". Pages '08 can not save as ".docx" files, just ".doc" files, but since MS Office 2007 can open these ".doc"

  • Clean_reqreq_up and BBP_get_status_2

    I am bit confused about the use of these two programs Clean_reqreq_up and BBP_get_status_2. What I understand from the different forums i read is that clean_reqreq_up creates the PO in the backend (classic scenario) after the shopping cart is approve

  • How to turn off plug-ins? CS3

    I have recieved an InDesign document that I am planning to update. I am told that a plug-in is not installed on my computer. I happen to know that this plug-in is not necessary for this document, so how do I remove the reference /link to it? PS. I am

  • External Editor Inconsistent Behavior

    PSE is my external editor. Fairly often (maybe 20% of the time) after editing is complete and I close the file, it will not directly update my iPhoto file. Instead, I have to save the edited image as PS, PNG, or TIFF outside of iPhoto, then import in

  • Changing Scrollwheel Click Functionality

    Coming to Mac as a Windows user, I haven't found much use for the widgets dashboard. Naturally, it's pretty frustrating to have the widgets pop up every time I click with the scrollwheel in Firefox. In Windows, scrollwheel clicking automatically open