I was able to define accelerators that solved the Tab and Escape key
problems.  In case this helps others, I am pasting relevant code below.
Please forgive the lack of formatting:  I happen to be blind and find
indentation more of a hindrance than a help with my talking computer
system.  

Regards,
Jamal

Win32::GUI->import(qw(ES_WANTRETURN GW_HWNDNEXT GW_HWNDPREV GW_HWNDLAST
GW_HWNDFIRST));

package Win32::GUI;

sub Tab {
my $Focus = GetFocus();
my $Next = GetWindow($Focus, GW_HWNDNEXT);
$Next = GetWindow($Focus, GW_HWNDFIRST) unless $Next;
SetFocus($Next);
return 1;
}

sub ShiftTab {
my $Focus = GetFocus();
my $Prev = GetWindow($Focus, GW_HWNDPREV);
$Prev = GetWindow($Focus, GW_HWNDLAST) unless $Prev;
SetFocus($Prev);
return 1;
}

my $Keyboard = Win32::GUI::AcceleratorTable->new(Escape => sub {-1}, Tab
=> \&Tab, 'Shift+Tab' => \&ShiftTab);

my $Dlg = Win32::GUI::Window->new(-name => 'Dlg', -title => $p1, -width
=> 434, -height => 483, -dialogui => 1, -accel => $Keyboard,
-onTerminate => sub {-1});


Reply via email to