05-22-2007 08:51 AM
05-22-2007 08:58 AM
You could use an event structure to detect the "Key Down?" event. Then check the scancode in the event. If you get an enter (28), discard it and send a tab (15) to the scancode output of the event. Otherwise pass the scancode through without discarding it.
I'm not sure if I would do this because you could never actually use enter in the VI, it would always replace it with tab. You could have some logic if you need enter to work in any other way. This depends on the VI though.
05-22-2007 09:13 AM
05-22-2007 09:21 AM
MUCH more tedius:
You could have a property node for the "next control" and set it's "Key Focus" to true when vkey = "Enter", "Return" in a "Key Down" event from the current control. This gives you the ability to move the focus wherever, as well as simple error checking.
I use this method and also highlight the contents of the next control so that the user can use the exisiting value OR update it without manually deleting the exisiting entry.
05-22-2007 10:42 AM - edited 05-22-2007 10:42 AM
Message Edited by intvsteve on 05-22-2007 10:43 AM
05-23-2007 01:53 AM
Marc, Thanks!
I thought of this having looked at another thread on the forum. There are two issues with this approach:
1) The application has many sub-vis. Does that mean the keydown? event has to be programmed for each sub-vi?
2) Each sub-vi has many controls (lets say an average of 20). I understand the keydown? event will have to include each of these controls when I define the event. Right?
Sounds like a lot of work. But I am glad if this works fine.
Will try this out and update here
05-23-2007 01:58 AM
smercurio_fc,
Thanks.
I understand the remapping software will be third party and I will need to execute before I start my application and then stop it after exiting my application. Or is the remapping code available in LV 7.1?
I could then simply insert its load module into the begining of my code and insert its exit module at the end of my code.
Any help?
05-23-2007 02:07 AM
05-23-2007 08:16 AM
Someone correct me if I am wrong, but I don't believe that LabVIEW 7.1 (which I believe Gurdas is using) treats "Enter" and "Return" differently.
See attached for clarification of what was meant. The other case "ASCII" , default is just wired straight through.
05-23-2007 08:26 AM