I'm trying to use some numpad button (like /
, *
and digits) as accelerators for wxMenuItem (C++, GTK), but they doesn't works.
If I specify just 2
, only the ordinary 2
button will fire the event, not 2
on numpad with NumLock ON (while ASCII codes are the same). It's the same with /
and *
buttons.
I've tried to find some specifications for accelerators in wxWidgets docs, but unfortunately they are not complete (for example, it says I need to specify pgdn
for PageDown key, but actually both PgDn
and PageDown
works good) and give no idea of using NumPad buttons.
Tried something like NumX
for NumPadX buttons - it doesn't works too.
So, the questions are:
1) Is there any complete specification for accelerators in wxWidgets?
2) If not, can anyone suggest me how to use NumPad buttons as accelerators?
You're looking for WXK_NUMPAD2
(which is documented together with all the other key codes) and the corresponding menu accelerator string (which is unfortunately not documented) is KP_2
.