Perhaps you could try using ord('Z'), it works for me:

        my $cc = Wx::NewId();
        $self->SetAcceleratorTable
          ( Wx::AcceleratorTable->new
            ( [ wxACCEL_ALT,  ord('Z'), $cc ] ) );

        Wx::Event::EVT_MENU($self, wxID_CLOSE, \&OnClose);
        Wx::Event::EVT_MENU($self, $cc, \&OnClose);


> I tried this:
> 
>       my $cc = Wx::NewId();
>       $self->SetAcceleratorTable
>         ( Wx::AcceleratorTable->new
>           ( [ wxACCEL_ALT,  'Z', $cc ] ) );
> 
>       Wx::Event::EVT_MENU($self, wxID_CLOSE, \&OnClose);
>       Wx::Event::EVT_MENU($self, $cc, \&OnClose);
> 
> Now, Ctrl-W works (due to the EVT_MENU on wxID_CLOSE). But Alt-Z does
> not work. What am I overlooking?
> 
> -- Johan

Reply via email to