- if (CheckForAccelerator(_event))
- {
- // Do nothing! We intercepted and processed the event as an
- // accelerator.
- return;
- }
- else if (CheckForKeyDown(_event))
- {
- // We intercepted and processed the key down event
- return;
- }
- else
- {
- XtDispatchEvent(event);
- return;
- }
+ if (CheckForAccelerator(_event))
+ {
+ // Do nothing! We intercepted and processed the event as an
+ // accelerator.
+ return;
+ }
+#if 1
+ // It seemed before that this hack was redundant and
+ // key down events were being generated by wxCanvasInputEvent.
+ // But no longer - why ???
+ //
+ else if (CheckForKeyDown(_event))
+ {
+ // We intercepted and processed the key down event
+ return;
+ }
+#endif
+ else
+ {
+ XtDispatchEvent(event);
+ return;
+ }
+ }
+ else if (event->type == KeyRelease)
+ {
+ // TODO: work out why we still need this ! -michael
+ //
+ if (CheckForKeyUp(_event))
+ {
+ // We intercepted and processed the key up event
+ return;
+ }
+ else
+ {
+ XtDispatchEvent(event);
+ return;
+ }