[Gambas-user] Keyboard input help requested
Cogier
charlie at ...2793...
Thu Mar 15 14:21:24 CET 2012
Rolf,
Thanks for the reply. Yes it does work in Linux and I can get it to work in
a TextBox but as you say it needs to be in focus and I think the program
will look silly if at the time of a scan the particular TextBox is not in
focus. I know there is a way to capture a single key press but I want to
capture the whole string. The input string is terminated by a "Return" code
so I can handle the end of the string with code.
So I am looking for a way to capture the input string directly from the
"Keyboard" with code rather than a TextBox.
Thanks,
Charlie
Rolf-Werner Eilert wrote:
>
> Am 15.03.2012 10:12, schrieb Cogier:
>>
>> I have a barcode reader that will sent the result of a scan to any text
>> editor, or word processor as it emulates a keyboard.
>>
>> What I can't seem to do is get Gambas to read the string produced, it
>> must
>> be similar to reading a file but all my efforts so far have failed.
>>
>> Any help would be appreciated.
>
> Depends on the interface - what does the reader's manual say about that?
> Does it produce input under Linux anyway? And if so, what exactly
> happens and when?
>
> From what you say, it runs this way: The user scans, the scanner says
> BEEP, and a string is sent (as if from the keyboard) to the GUI object
> currently having the focus. Right? Keyboard input is read via KeyCodes
> in Gambas, so maybe your approach is just the wrong one (not file, not
> string, but _KeyPressed)? Did you try a TextBox, and did it have the
> focus?
>
> Regards
>
> Rolf
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
--
View this message in context: http://old.nabble.com/Keyboard-input-help-requested-tp33496560p33509708.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list