diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-01-14 15:57:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-01-14 15:57:59 (GMT) |
commit | e50ff59782eb62c098fa31ce44b5ef22696d23ba (patch) | |
tree | da7364467d81702a33baeda8458765145bfb8727 /library/scrlbar.tcl | |
parent | 74c1da3513a051544b27bfde2a52525f55d648a2 (diff) | |
download | tk-e50ff59782eb62c098fa31ce44b5ef22696d23ba.zip tk-e50ff59782eb62c098fa31ce44b5ef22696d23ba.tar.gz tk-e50ff59782eb62c098fa31ce44b5ef22696d23ba.tar.bz2 |
Consistancy in Key/Button bindings: Use "<Button-1>" in stead of "<1>", "Key" in stead of "KeyPress" and "Button" in stead of "ButtonPress". Also eliminate unnessary "Any" and "Key" modifiers.
Diffstat (limited to 'library/scrlbar.tcl')
-rw-r--r-- | library/scrlbar.tcl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index df4b8ab..bce8391 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -39,7 +39,7 @@ bind Scrollbar <Leave> { } %W activate {} } -bind Scrollbar <1> { +bind Scrollbar <Button-1> { tk::ScrollButtonDown %W %x %y } bind Scrollbar <B1-Motion> { @@ -57,13 +57,13 @@ bind Scrollbar <B1-Leave> { bind Scrollbar <B1-Enter> { # Prevents <Enter> binding from being invoked. } -bind Scrollbar <2> { +bind Scrollbar <Button-2> { tk::ScrollButton2Down %W %x %y } -bind Scrollbar <B1-2> { +bind Scrollbar <B1-Button-2> { # Do nothing, since button 1 is already down. } -bind Scrollbar <B2-1> { +bind Scrollbar <B2-Button-1> { # Do nothing, since button 2 is already down. } bind Scrollbar <B2-Motion> { @@ -84,10 +84,10 @@ bind Scrollbar <B2-Leave> { bind Scrollbar <B2-Enter> { # Prevents <Enter> binding from being invoked. } -bind Scrollbar <Control-1> { +bind Scrollbar <Control-Button-1> { tk::ScrollTopBottom %W %x %y } -bind Scrollbar <Control-2> { +bind Scrollbar <Control-Button-2> { tk::ScrollTopBottom %W %x %y } @@ -166,12 +166,12 @@ if {[tk windowingsystem] eq "aqua"} { } if {[tk windowingsystem] eq "x11"} { - bind Scrollbar <4> {tk::ScrollByUnits %W v -5} - bind Scrollbar <5> {tk::ScrollByUnits %W v 5} - bind Scrollbar <Shift-4> {tk::ScrollByUnits %W h -5} - bind Scrollbar <Shift-5> {tk::ScrollByUnits %W h 5} - bind Scrollbar <6> {tk::ScrollByUnits %W h -5} - bind Scrollbar <7> {tk::ScrollByUnits %W h 5} + bind Scrollbar <Button-4> {tk::ScrollByUnits %W v -5} + bind Scrollbar <Button-5> {tk::ScrollByUnits %W v 5} + bind Scrollbar <Shift-Button-4> {tk::ScrollByUnits %W h -5} + bind Scrollbar <Shift-Button-5> {tk::ScrollByUnits %W h 5} + bind Scrollbar <Button-6> {tk::ScrollByUnits %W h -5} + bind Scrollbar <Button-7> {tk::ScrollByUnits %W h 5} } # tk::ScrollButtonDown -- |