Keyboard stops working

Post your Gambas programming questions here.
dpcons
Posts: 2
Joined: Tuesday 21st April 2020 12:34am

Keyboard stops working

Post 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
User avatar
grayghost4
Posts: 174
Joined: Wednesday 5th December 2018 5:00am
Location: Marengo, Illinois usa

Re: Keyboard stops working

Post by grayghost4 »

Post the program so others can try and see if it works on there machines
dpcons
Posts: 2
Joined: Tuesday 21st April 2020 12:34am

Re: Keyboard stops working

Post 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.
User avatar
grayghost4
Posts: 174
Joined: Wednesday 5th December 2018 5:00am
Location: Marengo, Illinois usa

Re: Keyboard stops working

Post 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
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Keyboard stops working

Post 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
priscalos
Posts: 1
Joined: Wednesday 29th March 2023 4:02am

Re: Keyboard stops working

Post 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.
Last edited by priscalos on Thursday 30th March 2023 1:17pm, edited 1 time in total.
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Keyboard stops working

Post by BruceSteers »

What version of gambas3 are you using?

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

How did you install gambas?
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Keyboard stops working

Post 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)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Keyboard stops working

Post 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.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
grayghost4
Posts: 174
Joined: Wednesday 5th December 2018 5:00am
Location: Marengo, Illinois usa

Re: Keyboard stops working

Post by grayghost4 »

This is a 3 year old thread, and the OP has not been back since then ;)
Post Reply