No keypress events received in wxGTK 3.1

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Petru
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sat Dec 31, 2011 1:05 pm
Contact:

No keypress events received in wxGTK 3.1

Post by Petru »

Hi. I've recently blown the dust off an old project of mine where I have some custom widgets derived from wxPanel. My old project compiled with wxMSW 2.9 works fine, but on wxGTK 3.1 the custom widgets' handlers for EVT_KEY_DOWN, EVT_KEY_UP don't fire at all. Any thoughts?
Last edited by Petru on Wed Jan 24, 2018 7:27 am, edited 1 time in total.
Petru Dimitriu, Romanian. wxWidgets 3.1 on Windows 7 & Ubuntu with MinGW/GCC + CLion
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: No keypress events received in wxGTK 3.0

Post by ONEEYEMAN »

Hi,
What version of GTK+ did you compile it against?
Also, which 3.0 version - 3.0.0 or 3.0.2?

Finally any special configure options you used?

Thank you.
Petru
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sat Dec 31, 2011 1:05 pm
Contact:

Re: No keypress events received in wxGTK 3.0

Post by Petru »

Hi,
I should make a correction. Upon checking, my version is actually 3.1.0.0 . GTK+ version is 3.
Also, maybe it's worth saying that these custom widgets / panels are managed by AUI, they have the wxWANTS_CHARS set and they do receive focus, but no keystrokes.

Thanks.
Petru Dimitriu, Romanian. wxWidgets 3.1 on Windows 7 & Ubuntu with MinGW/GCC + CLion
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: No keypress events received in wxGTK 3.1

Post by ONEEYEMAN »

Hi,
What is exact GTK+ version?
How do you know the panel has the focus, but not receive the key events? Does those panel have a text control? Or something that can respond to the keyboard? Did you call "event.Skip()" in all keyboard event handlers?

Can you show some code to reproduce the issue?

Thank you.
Petru
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sat Dec 31, 2011 1:05 pm
Contact:

Re: No keypress events received in wxGTK 3.1

Post by Petru »

Hi,
I remembered I published parts of my project on GitHub some time ago. Here is one of the custom widgets:
https://github.com/petru-dimitriu/wxPianoControl
At the time when I posted it, it worked fine under Windows.
Thank you.
Petru Dimitriu, Romanian. wxWidgets 3.1 on Windows 7 & Ubuntu with MinGW/GCC + CLion
Petru
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sat Dec 31, 2011 1:05 pm
Contact:

Re: No keypress events received in wxGTK 3.1

Post by Petru »

Bump...
Petru Dimitriu, Romanian. wxWidgets 3.1 on Windows 7 & Ubuntu with MinGW/GCC + CLion
Post Reply