Anyone know how to bind arrow keys in Tk? The first bind call below does
what I want. The second doesn’t have any apparent effect. My window has
some buttons as well as a canvas, and the buttons have focus, but I
don’t bind arrows in the buttons (tried it, had no effect either).
works
$root.bind “period” do
$canvas.xview “scroll”, 1, "units"
end
#doesn’t work
$root.bind “rightarrow” do
$canvas.xview “scroll”, 1, "units"
end
On Thursday 20 June 2002 09:16 pm, Joel VanderWerf wrote:
Anyone know how to bind arrow keys in Tk? The first bind call below does
what I want. The second doesn’t have any apparent effect. My window has
some buttons as well as a canvas, and the buttons have focus, but I
don’t bind arrows in the buttons (tried it, had no effect either).
works
$root.bind “period” do
$canvas.xview “scroll”, 1, “units”
end
#doesn’t work
$root.bind “rightarrow” do
$canvas.xview “scroll”, 1, “units”
end