How to separate "Key down" event from panel and numerical control

Hi, All
I have a vi proecess key down events for panel and  a numerical control in this panel. the application will do: 
1. when panel is focused, user can use "up" and "down" key to driver some hardware.
2. when the numerical control has the focus, "up" and "down" key will change it's value as usual.
somehow the second one did not work, because the panel "key down" event was trigger as well when I use "up' "down" key inise the numerical control. 
then I used "Key down?" of numerical control to block the "up/down" key. But the first time when I run the Vi, the panel still got triggered one time. 
any suggestions on this? test code attached  in this post too. 
thanks
CQ
Solved!
Go to Solution.
Attachments:
KeyDown_Up_valuechange.vi ‏16 KB

This works for me in 2014.  In short, you just need to check to see if your numeric has the focus.  If it doesn't, then you process the key value.  No need for any other event here except for the stop button.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
KeyDown_Up_valuechange_BD.png ‏32 KB

Similar Messages

  • InsertionPalette activex control key down event

    Hi,
    Can any one know how to get the key down event of InsertionPalette activex control.
    I have handled the KeyDownEvent but it is not fired while the control is active and key is pressed.
    regards,
    Ceaser

    Ceaser,
    what is the application developement environment you are working with?
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Key down event in background

    Is there a way to make the key down event in the wait event structure run in the background when labview is not the focus? Also what is the difference between the "key down? event" and the "key down event"? I couldn't find a good answer in the LabVIEW help.

    tst wrote:
    To expand a bit on RF's answer, while you can't use the event structure to register for key down events in other windows, there are some potential options:
    You could use the input VIs to poll the keyboard (and you can have a loop which will use a user event to send each new key to an event structure). The main problem with this (and it's a big one) is that it is unreliable. You would have to poll quickly enough (probably at ~20-50 Hz) to have a decent chance of being sure that you're not missing keys and even then it's not guaranteed. The other problem is that you don't know which window was actually in focus.
    You could try getting the window messages from the other window. I have no real experience with Windows messaging, but my understanding is that this will probably require you to write a custom hook in C to get it, but it's possible that this is also possible with the standard Win32 API functions. Even if it is, this is probably not something you want to get into to, but you could try looking it up.
    Actually this Windows Messaging already exists in LabVIEW:
    http://zone.ni.com/devzone/cda/epd/p/id/4394
    However there is a few issues.  It only partially works in Windows 64-bit, and you have to know the handle to the application that you want to intercept key downs for.  I did a quick test and I was able to detect the KEYDOWN event in another VI that was running for for some reason got an error when I tried to get keydown on notepad.  This method would eliminate polling if you can get it to work, and because of this you shouldn't miss any key presses.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • When is Key down event case triggered

    Hi all,
    In event structure there is an event <this VI> key Down? 
    When will this event be triggered... i.e will this event be triggered only in case of a keyboard entry... ?
    Or in case i use a barcode reader, if data gets populated in a control on the Front panel through the barcode reader will this trigger this event...?
    Thanks

    The Key Down event will only be fired when a key is pressed on the keyboard.  If you want to fire an event off of a Front panel control, you can either use a User Event or a property node called Value (Signaling).  This property node will cause a Value Change event to trigger when the value of the Front panel control changes.
    Cheers

  • IMovie 10 - how do I move an event from one library to another?

    Greetings,
    I have updated all of my projects and events from iMovie 9 to iMovie 10.0.1. They now all sit in different libraries on different external HDDs.
    How do I move an event from one library to another library in iMovie 10? How do I copy an event from one library to another library in iMovie 10?
    Thanks,
    John

    Simply drag and drop from one library to another.  See:  http://help.apple.com/imovie/mac/10.0/#mov3fa25bae7
    Geoff.

  • How can I get the events from a java program?

    I want to make a monitor to watch a java program.How can I get the events from the GUI of this program some as mouse cliking, keyinput. So I can watch these in my monitor.
    Thanks

    Hi,
    To put a monitor to the events occuring in the GHUI u need to register required components with the appropriate EventListeners.
    Liek if u want to get notified when a mouse is clicked, then u need to add The MouseListener to the component which u want to be monitored.
    Say
    myFrame which is the JFrame object which shuld be monitored for the events.
    Then in ur program u have to add following code
    myFrame.addMouseListener( someObectReference );
    Here the someObjectReference should be an instance to a concrete class ..i.e. U write a class like the following
    public class MyMouseListener implements MouseListener {
    // override the followig methods
    public void mouseClicked(MouseEvent me){ sop("MOUSE CLICKED ON THE FRAME");}
    public void mousePressed(MouseEvent me){}
    public void mouseReleased(MouseEvent me){}
    If u dont want to use another class for listening to the events. Then u can make teh current class monitor the events. To do so ur class should implement the appropriate listener and should override the required methods.
    and u should say myFrame.addMouseListenet( this );
    thats it

  • Key down event handeling when the VI isn't active

    Hi
      I've written a simplel VI that increases or decreases a numerical indicator depending on which key is pressed on the keyboard. But this only works when the VI window is active (the titlebar is blue and not gray). Is there anyway to listen for the key-down event even though the VI is not active?
    In advance thanks
    Georg

    I recently ran into a problem with the Acquire Data.
    See http://forums.ni.com/ni/board/message?board.id=170&message.id=147363
    Just in case....

  • Key down events

    Hi,
    I've been working on code for handling a flash-plugin inside an existing application, and have been looking at getting the flash player working with the Cocoa/CoreGraphics API.
    Thus far, I have plugin loading, focus, mouse handling events all working. But then key events don't work consistently - on some flash applications, the key down events work, but on most they return a '1' but the flash app doesn't respond.
    This is most odd, and a pretty esoteric type of work - I don't know many people who get this kind of work, and it's hard finding people who can share their experiences of this.
    I've been going through the NPAPI docs on the mozilla website and copying a lot of the handling code in WebKit, Chromium and Firefox, but none of it seems to help any more - my handling code works the same way as that does, but the responses for key down events are different.
    So, this is just a last try before I go crazy - has anyone ever seen anything like this before?
    Thanks,
    Tom.

    Well, it is a problem with Flash Player and not Flash. I don't need an experienced Flash developer.
    Seriously though, the nature of the question is so esoteric that I doubt there are many developers anywhere who could give much advice.
    Thanks anyway.

  • Detecting external keyboard Key Down Events in Ipad2 without EditText Field.

    I am trying to detect key pressed for an external keyboard (bluetooth) in IPad2 , I was only able to do so when the focus is on EditText Field.
    Without the edit text field , the key down events are not captured by the program . Is there any work around for this issue .

    I am trying to detect key pressed for an external keyboard (bluetooth) in IPad2 , I was only able to do so when the focus is on EditText Field.
    Without the edit text field , the key down events are not captured by the program . Is there any work around for this issue .

  • How do i keep my events from tripling on my calendars

    how do i keep my events from tripling on my calendars? I have the date once on mac and once on phone but on i pad it shows up three times and some I have not even figured out how to delete on the i pad

    Open FaceTime preferences>Settings and uncheck iPhone Cellular Calls.

  • CS3/MAC key down events

    I have a plugin which presents a dialog and does some keyboard input,
    and under mac/cs3 ONLY, indesign is capturing and acting upon key
    down events before the plugin sees them.
    Oddly, key UP events are being passed through normally.
    These events are being delivered to the plugin by the
    mac toolbox function WaitNextEvent.
    Is this a known problem?

    The last time I read about the Mac event manager, WaitNextEvent was deprecated in favour of carbon events. Maybe InDesign now also follows this path.
    http://developer.apple.com/documentation/Carbon/Conceptual/Carbon_Event_Manager/Concept/ch apter_2_section_4.html
    Anyway, bypassing InDesign in order to invoke WNE is bad style. Make yourself familiar with IEventHandler and alike.
    > Is this a known problem?
    If you're working at Extensis then at least one of your users now has found the problem ... . Could be a different reason though, I just saw this post:
    Jeremy Paine, "ID CS3 Control Palette Oddity" #10, 17 Sep 2007 8:33 pm
    Dirk

  • So I can't download songs from my account because I now live in Mexico? How do I get my music from Icloud and down load new ones? Do I have to fly to the USA ?

    I can't download songs from my account because I now live in Mexico. How do I get my music from Icloud and down load new ones to my computer?

    Hi gene98,
    Welcome to the Apple Support Communities!
    It sounds like you still need to change the country for your iTunes Store account. Please review the attached article for information and instruction on how to do so.
    Change the country of your iTunes Store, App Store, iBooks Store, and Mac App Store account
    http://support.apple.com/kb/HT6119
    Have a great day,
    Joe

  • How do I enter an event in Calendar and repeat it every 3rd day

    How do I enter an event in Calendar and repeat it every 3rd day

    Hello PatrickMaryAnn,
    Thanks for the question, and welcome to Apple Support Communities.
    When editing or creating an event, choose Repeat > Custom… - then choose "Daily" and enter Every 3 days.
    Calendar: Update or delete an event
    http://support.apple.com/kb/PH11509
    Thanks,
    Matt M.

  • How do I copy a photo from iPhoto and paste it into a text/Pages document?

    How do I copy a photo from iPhoto and paste it into a text/Pages document (using iMaC)?

    Use the Media browser in Pages and just drag the image over.

  • How to delete archive log files from ASM through Grid Control

    Hi
    Anybody suggest me how to delete archive log files from ASM through Grid Control.
    Thanks

    It is important to specify both, the oracle version and os version when posting, so confusions can be avoided.
    In this particular case, since you are referring to asm and grid control you could be talking about either 10gR1, 10gR2 or 11gR1; but I strongly suggest you to avoid us to be guessing. In either case, you sould go to the maintenance tab of the target database and program a scheduled 'delete noprompt obsolete;' procedure. This will purge the information stored at the Flash recovery area, which I assume you have declared inside the ASM.
    ~ Madrid
    http://hrivera99.blogspot.com/

Maybe you are looking for