in reply to Tk bind KeyPress KeyRelease Problem

I figured out a sort of work around. As far as I can tell, the Control, Shift, and Alt keys all work they way I'd like my other keys to work (only one KeyPress/KeyRelease). I used that to do this:
$top->bind('<Control-KP_Left>' => sub{ &pressed("left",1,2) }); $top->bind('<Control-KP_Down>' => sub{ &pressed("back",0, 7) }); $top->bind('<Control-KP_Right>' => sub{ &pressed("right",5, 6) }); $top->bind('<Control-KP_Home>' => sub{ &pressed("spinl",1, 3, 5, 7) } +); $top->bind('<Control-KP_Up>' => sub{ &pressed("forward",3, 4) }); $top->bind('<Control-KP_Prior>' => sub{ &pressed("spinr",0, 2, 4, 6) } +); sub pressed { my @args = @_; my $arg = shift @args; &fire_thrusters(@args); for ($arg){ /left/i && do { $top->bind('<Control-KP_Left>' => sub{}); }; /right/i && do { $top->bind('<Control-KP_Right>' => sub{}); }; /back/i && do { $top->bind('<Control-KP_Down>' => sub{}); }; /forward/i && do { $top->bind('<Control-KP_Up>' => sub{}); }; /spinl/i && do { $top->bind('<Control-KP_Home>' => sub{}); }; /spinr/i && do { $top->bind('<Control-KP_Prior>' => sub{}); }; } $top->bind('<KeyRelease-Control_R>' => sub{ &released($arg) }); $top->bind('<KeyRelease-Control_L>' => sub{ &released($arg) }); } sub released { my $arg = shift; &stop; for ($arg){ /left/i && do { $top->bind('<Control-KP_Left>' => sub{ &presse +d("left",1,2) }); }; /right/i && do { $top->bind('<Control-KP_Right>' => sub{ &presse +d("right",5, 6) }); }; /back/i && do { $top->bind('<Control-KP_Down>' => sub{ &presse +d("back",0, 7) }); }; /forward/i && do { $top->bind('<Control-KP_Up>' => sub{ &presse +d("forward",3, 4) }); }; /spinl/i && do { $top->bind('<Control-KP_Home>' => sub{ &presse +d("spinl",1, 3, 5, 7) }); }; /spinr/i && do { $top->bind('<Control-KP_Prior>' => sub{ &presse +d("spinr",0, 2, 4, 6) }); }; } $top->bind('<KeyRelease-Control_R>' => sub{}); $top->bind('<KeyRelease-Control_L>' => sub{}); }
Now the user can press Ctrl-8 and hold Ctrl until they want to call the &released function. It's not nearly as cool as just holding down the Numpad keys, but I guess it'll work. If someone has a better solution please post.