LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Enter key from numeric keypad to enter and switch to next element in an array control

Hello all,

I have a question regarding a simple but annoying problem, of which I did not found a solution yet.

I have written an application in which I have to enter data manually in a numeric array control.
If I want to enter the value and go to the next element in the array control, i am forced to use the Tab key on my keyboard, or risk RSI using the mouse.

How can I assign the Enter key of the numeric keypad section of my keyboard to to the same as the Tab key?

Kind regards,

Raymond


0 Kudos
Message 1 of 12
(6,999 Views)
Your mean is how to escape use tab control to input array value? If so, you can use Event Structure achive this result,(Value change)
0 Kudos
Message 2 of 12
(6,998 Views)
Hi Raymond,

IMHO tab-key is nice for this purpose... (left hand: tab, right hand: numpad Smiley Wink)

As mentioned before you can use a value-changed event for this.
You can also filter out keypress-events for the array control using "KeyDown?" filter event: just go to next array element when numpad-enter is pressed...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 12
(6,981 Views)
To add to the previous answers... In the event structure, use the key focus
property to give the desired control the new key focus.

Regards,

Wiebe.


0 Kudos
Message 4 of 12
(6,970 Views)
My prefered method is also using the Key Down? event, but with a small twist - the right terminals allow you to change the key that was clicked. This way, you can replace the Enter with a tab (ASCII 9). It just requires a case structure to only do this when you press Enter.


___________________
Try to take over the world!
Message 5 of 12
(6,959 Views)
That is indeed easier, because you don't have to deal with the ordering of
the controls yourself, you simple use LabVIEW's order.

Regards,

Wiebe.


0 Kudos
Message 6 of 12
(6,950 Views)
One note to make here is that you can't use the Array -> Key Down? Event. This will not handle events that are fired on the array element only on the array control (with other words the digital index and scroll bars). Inorder to get the Key Down? event for the array elements you need to create a static reference for this element and use this to register a dynamic Key Down? event. This event will fire when you press a key when editing any element in the array.
 
Now you can filter the Enter to a Tab and make the focus jump to the next array element while editing. Attached a small example that demonstrates this.
 
Thanks
Karsten - NINL
 
 
Message 7 of 12
(6,907 Views)


KvZ wrote:
Inorder to get the Key Down? event for the array elements you need to create a static reference for this element and use this to register a dynamic Key Down? event.
Thanks. I didn't have relevant code in front of me, so I forgot to mention that.

___________________
Try to take over the world!
0 Kudos
Message 8 of 12
(6,891 Views)

Can you convert the example in a image or can you convert in to 8.2.1 version?.

 

Best regards

0 Kudos
Message 9 of 12
(5,864 Views)

@Tecnico.bcn@firevision.es wrote:

Can you convert the example in a image or can you convert in to 8.2.1 version?.

 

Best regards


Saved in 8.2.1 for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 12
(5,852 Views)