keyboard alllways activ, even not programmed
Posted
#1
(In Topic #523)
Trainee
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
Hopefully you have mercy with this old man
Thanks in advance
BTW: it has the same error when started as an executable outside the gambas editor.
Posted
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!
…and don't call yourself OLD…I'm only a couple of years behind you!…Hopefully you have mercy with this old man…
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).
Posted
Regular

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
Posted
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.
Please let me know.
Posted
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
Posted
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.
Posted
Guru

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.
Posted
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.![]()
![]()
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.
Posted
Regular

on desktop, Menu / Preferences / keyboard
on my Xubuntu.
regards
Olivier
Posted
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.
Posted
Guru

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.
Posted
Enthusiast

Posted
Trainee
So I changed it into:
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
Posted
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:
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 timeops:
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
1 guest and 0 members have just viewed this.


