Keyboard Handler

General FreeBASIC programming questions.
Dinosaur
Posts: 1368
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Keyboard Handler

Postby Dinosaur » Dec 14, 2020 20:55

Hi All

I am adding rfid tags to my Museum Tp-Link application and having problems unloading Allegro keyboard
handler and getting FB Inkey working.

These rfid readers basically shove characters into the keyboard buffer via a usb interface.
The problem is that my app uses cgui library which traps all key strokes.
However, I unloaded the Allegro key handler with "Remove_Keyboard" and attempting keyboard input shows cgui only
relies on Allegro key handler. In other words typing manually doesn't work.
Then tried to capture char's with Inkey.
But Inkey does not find any char's in the buffer, or has been disabled when Allegro loaded.
There are no errors when I call Inkey.

The rfid reader works with a small test program (that doesn't use cgui or Allegro) in Linux & Windows.
The reader beeps when it is presented with a Tag, however if the buffer is not emptied, then the reader
stops pushing more char's into the buffer and there is no acknowledging beep.

Anyone have any suggestions as to how to overcome this ?

Regards
Dinosaur
Posts: 1368
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Re: Keyboard Handler

Postby Dinosaur » Dec 17, 2020 2:49

Hi All

I have found an alternative solution to this problem:
By opening a Text window and giving that window "Focus" , any characters typed in or pushed into the keybuffer
appear in this window, which allows them to be assigned to a string variable.

It does not solve the problem that FreeBasic's Key input commands are not available after unloading Allegro's key handler.

Regards

Return to “General”

Who is online

Users browsing this forum: No registered users and 16 guests