Quote from PaulJonestindall on January 6, 2023, 6:55 pmI'm trying to figure out how to use the Short Cut Key feature in the General section of the TextEntry object, or even what its purpose is.
The documentation makes no mention of this feature.
My goal is to use an RFID card scanner and perform an action once the card is scanned. However, the card reader, like most USB readers and bar code scanners are actually keyboard emulators. If I use a TextEntry object, each card I scan acts like I'm typing and the Text Changed action that repeats is simply not practical. And, like most readers and scanners it can add a CR/LF after the scan. My current solution is to have a hidden button with an Enter Short Cut Key that works with the TextEntry object as long as it's not multiline.
It would be nice if the TextEntry Short Cut Key acted like a button to initiate the Text Changed commands. But I haven't figured out what that Short Cut Key feature even does, if anything.
Has anyone else ever used this feature?
I'm trying to figure out how to use the Short Cut Key feature in the General section of the TextEntry object, or even what its purpose is.
The documentation makes no mention of this feature.
My goal is to use an RFID card scanner and perform an action once the card is scanned. However, the card reader, like most USB readers and bar code scanners are actually keyboard emulators. If I use a TextEntry object, each card I scan acts like I'm typing and the Text Changed action that repeats is simply not practical. And, like most readers and scanners it can add a CR/LF after the scan. My current solution is to have a hidden button with an Enter Short Cut Key that works with the TextEntry object as long as it's not multiline.
It would be nice if the TextEntry Short Cut Key acted like a button to initiate the Text Changed commands. But I haven't figured out what that Short Cut Key feature even does, if anything.
Has anyone else ever used this feature?

Quote from luishp on January 6, 2023, 10:40 pm@pauljonestindall
- Double click the button
- Click on Short Cut Key field
- Press the key(s) you want to use as Short Cut Key (I think you want to use Enter key)
- Press OK button and done.
The actions on that button will be executed whenever the enter key is pressed.
I hope it helps.Rgeards.
The actions on that button will be executed whenever the enter key is pressed.
I hope it helps.
Rgeards.
Quote from Gaev on January 7, 2023, 12:49 am@pauljonestindall
I'm trying to figure out how to use the Short Cut Key feature in the General section of the TextEntry object, or even what its purpose is.
The documentation makes no mention of this feature.This information is described in the Common Properties section of the Help file ... https://winhelp.visualneo.com/CommonProperties.html
I believe it helps in jumping to (obtaining focus) of objects where keyboard entry is permitted; in some Applications, the switch from a keyboard to the mouse (click of objects that respond to the keyboard) slows down the process, and shortcut keys help in doing so without the use of the mouse.
My current solution is to have a hidden button with an Enter Short Cut Key that works with the TextEntry object as long as it's not multiline.
Note that this button's LeftClick event code will be triggered whenever the Enter Key is pressed while in any object on the page (not just the TextEntry object that is used by the RFID Card Scanner); in the event code for this (hidden) button, you an use the Global Variable [FocusedObject] to filter out the use of the Enter key in any other object.
As an alternative to the use of such buttons, you might consider a trick within the TextEntry object viz. ...
a) even though you want to work with a Single Line, specify the Style as Multi-Line; set its height so it only shows one line of text (appears to the user as a Single Line TextEntry box).
b) look for the Enter Key code ([#13][#10]) in the Text Changed event section; when this code is detected, remove it from the associated variable and take appropriate action; otherwise, do nothing.
I'm trying to figure out how to use the Short Cut Key feature in the General section of the TextEntry object, or even what its purpose is.
The documentation makes no mention of this feature.
This information is described in the Common Properties section of the Help file ... https://winhelp.visualneo.com/CommonProperties.html
I believe it helps in jumping to (obtaining focus) of objects where keyboard entry is permitted; in some Applications, the switch from a keyboard to the mouse (click of objects that respond to the keyboard) slows down the process, and shortcut keys help in doing so without the use of the mouse.
My current solution is to have a hidden button with an Enter Short Cut Key that works with the TextEntry object as long as it's not multiline.
Note that this button's LeftClick event code will be triggered whenever the Enter Key is pressed while in any object on the page (not just the TextEntry object that is used by the RFID Card Scanner); in the event code for this (hidden) button, you an use the Global Variable [FocusedObject] to filter out the use of the Enter key in any other object.
As an alternative to the use of such buttons, you might consider a trick within the TextEntry object viz. ...
a) even though you want to work with a Single Line, specify the Style as Multi-Line; set its height so it only shows one line of text (appears to the user as a Single Line TextEntry box).
b) look for the Enter Key code ([#13][#10]) in the Text Changed event section; when this code is detected, remove it from the associated variable and take appropriate action; otherwise, do nothing.

Quote from PaulJonestindall on January 7, 2023, 12:07 pm@luishp
The TextEntry object is rather different than other objects like a button in the way it executes actions. For every key press, the TextEntry action is executed. If I use a card scanner to get a 5 digit number, I get these 5 "key presses" in rapid succession so the actions needs to execute 5 times, unlike a button where clicking it or pressing the shortcut key executes the action only once. And, all the other action tabs are completely different than other objects, i.e. text change, mouse over, gain/lose focus vs left and right click. do you see my problem? This makes it very unclear, at least to me, how a shortcut key is even practical with a TextEntry object. I've tried using the shortcut key feature in various ways with no effect.
The TextEntry object is rather different than other objects like a button in the way it executes actions. For every key press, the TextEntry action is executed. If I use a card scanner to get a 5 digit number, I get these 5 "key presses" in rapid succession so the actions needs to execute 5 times, unlike a button where clicking it or pressing the shortcut key executes the action only once. And, all the other action tabs are completely different than other objects, i.e. text change, mouse over, gain/lose focus vs left and right click. do you see my problem? This makes it very unclear, at least to me, how a shortcut key is even practical with a TextEntry object. I've tried using the shortcut key feature in various ways with no effect.

Quote from luishp on January 7, 2023, 12:24 pm@pauljonestindall I think I understand you now. Not sure about a practical use for a Shortcut Key within a TextEntry object.
Anyway, regarding your problem, please check the attached sample. I have used the trick explained by @gaevRegards.
@pauljonestindall I think I understand you now. Not sure about a practical use for a Shortcut Key within a TextEntry object.
Anyway, regarding your problem, please check the attached sample. I have used the trick explained by @gaev
Regards.
Uploaded files:Quote from Gaev on January 7, 2023, 5:16 pm@luishp
Not sure about a practical use for a Shortcut Key within a TextEntry object.
Say you have a page with multiple TextEntry (and CheckBox/ListBox) objects
If the person entering the data has the focus on one of the other objects, and wants to jump to a particular TextEntry Box (without taking their fingers off the keyboard in order to click inside the desired TextEntry Box, then typing the designated Shortcut key combo (e.g. Ctrl+F) would have the focus switched to it.
Of course, the design of the page should be such that the user knows the shortcut key for each such box (perhaps in the label above/left of this box).
Anyway, regarding your problem, please check the attached sample.
Thanks for providing the sample (saved me the trouble).
@pauljonestindall
Please note that ...
a) the Enter key is represented by two characters (viz. Carriage Return and LineFeed); so it is best to search for [#13][#10]
b) depending on your requirement, instead of clearing the variable for the TextEntry Box, you may want to ...
- use StrReplace to remove the detected [#13][#10] (so the other characters are still visible to the user)
- copy the contents to another variable for further processing (with/without the [#13][#10] appendage).
Not sure about a practical use for a Shortcut Key within a TextEntry object.
Say you have a page with multiple TextEntry (and CheckBox/ListBox) objects
If the person entering the data has the focus on one of the other objects, and wants to jump to a particular TextEntry Box (without taking their fingers off the keyboard in order to click inside the desired TextEntry Box, then typing the designated Shortcut key combo (e.g. Ctrl+F) would have the focus switched to it.
Of course, the design of the page should be such that the user knows the shortcut key for each such box (perhaps in the label above/left of this box).
Anyway, regarding your problem, please check the attached sample.
Thanks for providing the sample (saved me the trouble).
Please note that ...
a) the Enter key is represented by two characters (viz. Carriage Return and LineFeed); so it is best to search for [#13][#10]
b) depending on your requirement, instead of clearing the variable for the TextEntry Box, you may want to ...
- use StrReplace to remove the detected [#13][#10] (so the other characters are still visible to the user)
- copy the contents to another variable for further processing (with/without the [#13][#10] appendage).