accelerators & wxKeyEvent

11 views
Skip to first unread message

Andre F

unread,
Jan 8, 2023, 8:53:19 PM1/8/23
to wx-u...@googlegroups.com

Quick question can I run both of these at the same time?  I thought I had them running at the same time, but now I'm not sure if they were or not.  I was originally running accelerators, then moved to keyevent handlers for the normal to prevent problems in one of my panels.  It worked.

I thought I even tested it, but now after going back and checking I see the accelerator stuff has stopped working.  Is it my code or can only one type of handler operate at a time?  Do I need to move everything to eventkey handling?.

Regards,

Igor Korot

unread,
Jan 8, 2023, 9:04:16 PM1/8/23
to wx-u...@googlegroups.com
Hi,

On Sun, Jan 8, 2023 at 7:53 PM Andre F <af68...@gmail.com> wrote:
>
>
> Quick question can I run both of these at the same time? I thought I had them running at the same time, but now I'm not sure if they were or not. I was originally running accelerators, then moved to keyevent handlers for the normal to prevent problems in one of my panels. It worked.
>
> I thought I even tested it, but now after going back and checking I see the accelerator stuff has stopped working. Is it my code or can only one type of handler operate at a time? Do I need to move everything to eventkey handling?.

What platform and wx version?

Can you try and run the keyboard sample and see?

Thank yo.u

>
> Regards,
>
> --
> Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
> ---
> You received this message because you are subscribed to the Google Groups "wx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CANdLyG3CPkGbW2zpjbp01QjLgp%3Dusex96SEYYNAQYxtVnNeKMA%40mail.gmail.com.

Andre F

unread,
Jan 8, 2023, 9:35:05 PM1/8/23
to wx-u...@googlegroups.com


I cross compile on linux to run on Windows 10 & 11.
recently change to: wxwidgets 3.2.1

command line:
x86_64-w64-mingw32-g++ -w WinID.h langApp.cpp langApp.h lang.cpp langFrame.h `wx-config --cxxflags --libs richtext, std` -o myprog  -static-libgcc -static-libstdc++

if the wxwidgets version makes a difference that might make sense.  I recently switched to 3.2.1 from 3.1.5.  When I verified the changes to handlers with the accelerators I was still using 3.1.5.  Right after that I started working on something else and changed to 3.2.1.

Are they both supposed to work together on 3.2.1?  Has there been any changes to accelerators since 3.1.5? 

If they are supposed to work together I will spend time trying to debug it or change back to 3.1.5(if that's the issue) before bothering you further.  I didn't have any reason for switching, just thought it might be time for an upgrade.

Regards,

Igor Korot

unread,
Jan 8, 2023, 9:45:59 PM1/8/23
to wx-u...@googlegroups.com
Hi,

On Sun, Jan 8, 2023 at 8:35 PM Andre F <af68...@gmail.com> wrote:
>
>
>
> I cross compile on linux to run on Windows 10 & 11.
> recently change to: wxwidgets 3.2.1
>
> command line:
> x86_64-w64-mingw32-g++ -w WinID.h langApp.cpp langApp.h lang.cpp langFrame.h `wx-config --cxxflags --libs richtext, std` -o myprog -static-libgcc -static-libstdc++
>
> if the wxwidgets version makes a difference that might make sense. I recently switched to 3.2.1 from 3.1.5. When I verified the changes to handlers with the accelerators I was still using 3.1.5. Right after that I started working on something else and changed to 3.2.1.
>
> Are they both supposed to work together on 3.2.1? Has there been any changes to accelerators since 3.1.5?
>
> If they are supposed to work together I will spend time trying to debug it or change back to 3.1.5(if that's the issue) before bothering you further. I didn't have any reason for switching, just thought it might be time for an upgrade.

Can you modify the minimal sample to add those 2, build and run?

That way we'll know for sure...

Than you
> To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CANdLyG2wDQWU1%2BVkEMzEdBGK17StKzk-Bi5eV1mqyXieHZiu5g%40mail.gmail.com.

Andre F

unread,
Jan 9, 2023, 12:23:01 AM1/9/23
to wx-u...@googlegroups.com

It's working on the minimal sample, so it's definitely my code.  I'll figure it out, thanks!

Regards,

Gunter Königsmann

unread,
Jan 9, 2023, 2:27:39 AM1/9/23
to wx-u...@googlegroups.com, Andre F
Did you forget the event.Skip() in your Key Event handler?
Reply all
Reply to author
Forward
0 new messages