Georgios Petasis <
pet...@iit.demokritos.gr> wrote:
> Στις 27/11/2011 12:42, ο Georgios Petasis έγραψε:
>> Hi all,
>> I want to use the extra buttons my mouse has (the ones on the side, that
>> map to next/prev in browser) in Tk.
I don't know how "platform-neutral" that will be, but you can try this:
wish
% bind . <Button> {puts %b}
Then click various buttons (or scroll wheels) on the main window.
Here on linux, I get 4 and 5 for scrolling up and down,
and I get 8 and 9 for two buttons at the left side of my mouse.
If I plug in an apple-mightymouse, with scroll-ball, then
scrolling sideways gives me 6 and 7, btw.
You can however NOT use these higher numbers for naming events
like <Button-8> - that only works up to 5. I guess you could
bind to <ButtonPress>, and then check the %b field to see, which
button it was.