Page 1 of 2

Keyboard stops working

Posted: Tuesday 21st April 2020 12:48am
by dpcons
I just started using Gambas3 today. As an old VB6 and VB.NET programmer, it seems very familiar and I think it should be very useful and fun for upcoming projects. Unfortunately, after compiling and running my the first simple app, the keyboard becomes disabled. I can save, restart and all is OK till I run my app and the keyboard again locks up. I have searched the forum for anything similar and didn't see anything. I'm running on an HP2000-Flex machine using the latest Linux Light. I'll try later today on my Ubuntu 18.04 and see if I get anything similar.
Thanks

Re: Keyboard stops working

Posted: Tuesday 21st April 2020 1:54am
by grayghost4
Post the program so others can try and see if it works on there machines

Re: Keyboard stops working

Posted: Tuesday 21st April 2020 4:55pm
by dpcons
Thanks for the response:

Public Sub Button1_Click()

If LCDLabel1.visible = False Then
LCDLabel1.visible = True
LCDLabel1.Text = "Hi There"
Else
LCDLabel1.visible = False
Endif

End

Public Sub Button2_Click()
Form.Close()
Quit
End

Pretty simple. 2 buttons and an LCDLabel.
Works fine on my Ubuntu 18.04 machine.

Re: Keyboard stops working

Posted: Tuesday 21st April 2020 9:11pm
by grayghost4
I don't see where you expect keyboard entry??

Or are you saying that the program or computer locks up?

the program does not lock up on my Mint 19.3 which is also ubuntu

Re: Keyboard stops working

Posted: Wednesday 22nd April 2020 11:58am
by cogier
Hi dpcons and welcome to the forum.

I have to agree with grayghost4. The program runs but you are not requesting any keyboard response from the program.

Try changing the Text Property of Button1 to &Go You can then use the [Alt] + G keyboard shortcut to test that the keyboard is working.

The use of Quit is not recommended in GUI programs. I suggest Me.Close instead.

When you post code use the gb button and this will happen: -
Public Sub Button1_Click()
  
  If LCDLabel1.visible = False Then
    LCDLabel1.visible = True
    LCDLabel1.Text = "Hi There"
  Else
    LCDLabel1.visible = False
  Endif
  
End

Public Sub Button2_Click()

  Me.Close

End

Re: Keyboard stops working

Posted: Wednesday 29th March 2023 4:06am
by priscalos
Hate posting an old thread but I just wanted to add that, as a fellow old-school VB programmer, I feel you on the familiarity of Gambas3. Sorry to hear about your keyboard issues though. That sounds super frustrating!
Have you tried using infra red keyboards? They're supposed to be super fast and responsive, so maybe that could help with the issue. But if that doesn't work, it might be worth looking into any potential conflicts with your system or other applications.
One thing you could try is running your app in debug mode and seeing if any error messages pop up related to the keyboard issue. It could be a simple coding error or something more complicated, but either way, it's worth investigating.

Re: Keyboard stops working

Posted: Wednesday 29th March 2023 1:22pm
by BruceSteers
What version of gambas3 are you using?

What os version is your linux lite? (ie debian ubuntu?)

How did you install gambas?

Re: Keyboard stops working

Posted: Wednesday 29th March 2023 1:34pm
by BruceSteers
There must be something else wrong with your program.

Because if it was a gambas issue then the gambas IDE would cause your keyboard lock up not just running your test program.

Post the program not just the code (use the Project/Make source archive menu item)

Re: Keyboard stops working

Posted: Wednesday 29th March 2023 2:24pm
by BruceSteers
also in the IDE go to the ? / System information menu
Press "Copy" to copy the info there and paste it here.
that is helpful info when helping with issues.

Re: Keyboard stops working

Posted: Wednesday 29th March 2023 3:27pm
by grayghost4
This is a 3 year old thread, and the OP has not been back since then ;)