keyboard alllways activ, even not programmed

Post

Posted
Rating:
#1 (In Topic #523)
Avatar
Trainee
Hello, the keyboard problem was solved but I have a new problem with the keyboard even it is not in the code.
It's strange but my program reacts every time I press the backspace button … let's say I start the application and everything works normal, I press the keyboord backspace and the focus jumps to a certain place, a message …. I hit the backspace again and the focus turns to another place in the program, an other message and switches off the timer …
I unchecked (hopefully this is the correct word, I'm not English) all messages, but with no positive result, I removed the keyboard function from my program but no result, I tested with another keyboard but with no positive result : hitting the backspace of the keyboard the focus of my program jumps to a certain place, and it shouldn't.
I hope I made myself understandable and you can see what I mean, it's not always easy to write in English  :oops:
Hopefully you have mercy with this old man  :D
Thanks in advance

BTW: it has the same error when started as an executable outside the gambas editor.
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Regular
stevedee is in the usergroup ‘Regular’

vito49 said

…I hope I made myself understandable and you can see what I mean, it's not always easy to write in English…

Your English is very good!

…Hopefully you have mercy with this old man…
…and don't call yourself OLD…I'm only a couple of years behind you!

Can you post a copy of your program (or an extract if you prefer) as that will enable us to check it out straight away (rather than us having to write our own test code).
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
ocoquet is in the usergroup ‘Regular’
hi From France, (my English is as poor as possible  :lol: )

Are you sure than the backspace is not a shortcut in your linux desktop ?????

Regards
Olivier
PS: I'm Just then years under you and we are not old, just mature  :lol:  :lol:  :lol:

Olivier Coquet
Gambas Dev
Le Forum développeur Gambas
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Trainee

stevedee said

Can you post a copy of your program (or an extract if you prefer) as that will enable us to check it out straight away (rather than us having to write our own test code).

Mmmm … I don't know if I don't slap in someones  face with it, it's a kinky program about a dominant and her … her online submissive man. The program is the Mistress and the user the submissive. If you can assure me I will not be banned from this forum I don't mind to post a working part of the code. I will remove also all shocking pictures and replace the originals by other nice pics. :lol:  :lol:

Please let me know.
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Regular
stevedee is in the usergroup ‘Regular’

vito49 said

stevedee said

Can you post a copy of your program (or an extract if you prefer) as that will enable us to check it out straight away (rather than us having to write our own test code).

Mmmm … I don't know if I don't slap in someones  face with it, it's a kinky program about a dominant and her…

Hmmm…this sounds like a question for admins Charlie or Jornmo…maybe just post the KeyPress parts of the code.

To post small sections of code, click on the gb edit button and just paste your code between the "gb" and "/gb" tags. This makes it easier to read because it preserves Gambas formatting
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Trainee

ocoquet said

Are you sure than the backspace is not a shortcut in your linux desktop ?????

I searched for these shortcuts but am unable to find them on my XFCE Manjaro ….
Do you have any idea where I can find them?
Thanks in advance.
Online now: No Back to the top

Post

Posted
Rating:
#7
Guru
BruceSteers is in the usergroup ‘Guru’
 The behaviour you describe is the behaviour of the Tab button. changing focus.

If your Gambas program has no code to do anything with backspace then there must be a shortcut set in your linux doing it.

Check your programs menu shortcuts.
check XFCE4 keyboard settings.
Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Guru
cogier is in the usergroup ‘Guru’

vito49 said


Mmmm … I don't know if I don't slap in someones  face with it, it's a kinky program about a dominant and her … her online submissive man. The program is the Mistress and the user the submissive. If you can assure me I will not be banned from this forum I don't mind to post a working part of the code. I will remove also all shocking pictures and replace the originals by other nice pics. :lol:  :lol:

Please let me know.

Please send the code to me Charlie admin at gambas dot one. If it's Ok I will post it for you. I think it will be alright as we are all old enough. I'm only 5 years behind you. ;) You asked which is nice. :D
Online now: No Back to the top

Post

Posted
Rating:
#9
Regular
ocoquet is in the usergroup ‘Regular’
 I think it's something like:

 on desktop, Menu / Preferences / keyboard

on my Xubuntu.

regards
Olivier

Olivier Coquet
Gambas Dev
Le Forum développeur Gambas
Online now: No Back to the top

Post

Posted
Rating:
#10
Avatar
Trainee

BruceSteers said

The behaviour you describe is the behaviour of the Tab button. changing focus.

If your Gambas program has no code to do anything with backspace then there must be a shortcut set in your linux doing it.

Check your programs menu shortcuts.
check XFCE4 keyboard settings.

Bruce, at the moment there is no code for using the keyboard in my program, but I like to insert it because it is a better way to hit an item than a button
Anyway, if you have more possibilities in mind, please let me know.
Online now: No Back to the top

Post

Posted
Rating:
#11
Guru
BruceSteers is in the usergroup ‘Guru’
 Nope.

You have a customised setting somewhere making backspace behave like the tab button.
that is wrong and going to cause other problems.. if you do not know how or where you have set it then re-install manjaro.
Online now: No Back to the top

Post

Posted
Rating:
#12
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
have a look here:

Keyboard Shortcuts - Manjaro
Online now: No Back to the top

Post

Posted
Rating:
#13
Avatar
Trainee
Hello all, I feel a bit stupid about this topic, because I told you that I used  key.backspase but I found out I wasn't, in fact I wanted the key.SPACE and of course I was pushing the wrong button all the time …
So I changed it into:

Code (gambas)

  1. Public Sub Form_KeyPress()
  2.   If Button3.Visible = True Then  
  3.             If Key.Code = Key.Space Then
  4.                 firstControl = Int(Rnd(6, 180))
  5.                 Button3.Visible = False
  6.                  Label7.Text += 1
  7.              End If
  8.     End If
  9.  End

but again, tapping the Space key also made my pc doing strange things.
I finally checked my code,  didn't find any errors, but rearranged some functions and suddenly everything was OK.
I have no idea what code was causing the error.
So please forgive me for wasting your time  :oops:
Online now: No Back to the top

Post

Posted
Rating:
#14
Guru
BruceSteers is in the usergroup ‘Guru’

vito49 said

Hello all, I feel a bit stupid about this topic, because I told you that I used  key.backspase but I found out I wasn't, in fact I wanted the key.SPACE and of course I was pushing the wrong button all the time …
So I changed it into:

Code (gambas)

  1. Public Sub Form_KeyPress()
  2.   If Button3.Visible = True Then  
  3.             If Key.Code = Key.Space Then
  4.                 firstControl = Int(Rnd(6, 180))
  5.                 Button3.Visible = False
  6.                  Label7.Text += 1
  7.              End If
  8.     End If
  9.  End

but again, tapping the Space key also made my pc doing strange things.
I finally checked my code,  didn't find any errors, but rearranged some functions and suddenly everything was OK.
I have no idea what code was causing the error.
So please forgive me for wasting your time  :oops:

Not a waste dude. we're here to help and be helped :)
I should add this…

Keypress event is strange.
QT and GTK behave quite differently.
GTK will show warnings about not allowing some methods while in a keypress event while QT seems not to.
There's probably pro's and con's for both gui's.
It can help to rearrange the code as you have done or changing to QT can sometimes help.
bigger problems can be fixed by making Timers, so the keypress event just starts a timer then freely exits, then the timer runs the process.

There's possibly a better way to get around it.

Also it can make a difference if for example your keypress events are from a TextArea control,
Using TextArea1_KeyPress() or using From_KeyPress() can make things behave differently.

Try different things.
Experimentation is the father of invention :)
Bruce
Online now: No Back to the top
1 guest and 0 members have just viewed this.