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/spinbox.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/spinbox.tcl')
-rw-r--r-- | library/spinbox.tcl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/spinbox.tcl b/library/spinbox.tcl index 1965ed8..820d1cd 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -79,31 +79,31 @@ bind Spinbox <<TraverseIn>> { # Standard Motif bindings: -bind Spinbox <1> { +bind Spinbox <Button-1> { ::tk::spinbox::ButtonDown %W %x %y } bind Spinbox <B1-Motion> { ::tk::spinbox::Motion %W %x %y } -bind Spinbox <Double-1> { +bind Spinbox <Double-Button-1> { ::tk::spinbox::ArrowPress %W %x %y set tk::Priv(selectMode) word ::tk::spinbox::MouseSelect %W %x sel.first } -bind Spinbox <Triple-1> { +bind Spinbox <Triple-Button-1> { ::tk::spinbox::ArrowPress %W %x %y set tk::Priv(selectMode) line ::tk::spinbox::MouseSelect %W %x 0 } -bind Spinbox <Shift-1> { +bind Spinbox <Shift-Button-1> { set tk::Priv(selectMode) char %W selection adjust @%x } -bind Spinbox <Double-Shift-1> { +bind Spinbox <Double-Shift-Button-1> { set tk::Priv(selectMode) word ::tk::spinbox::MouseSelect %W %x } -bind Spinbox <Triple-Shift-1> { +bind Spinbox <Triple-Shift-Button-1> { set tk::Priv(selectMode) line ::tk::spinbox::MouseSelect %W %x } @@ -117,7 +117,7 @@ bind Spinbox <B1-Enter> { bind Spinbox <ButtonRelease-1> { ::tk::spinbox::ButtonUp %W %x %y } -bind Spinbox <Control-1> { +bind Spinbox <Control-Button-1> { %W icursor @%x } @@ -200,18 +200,18 @@ bind Spinbox <<SelectAll>> { bind Spinbox <<SelectNone>> { %W selection clear } -bind Spinbox <KeyPress> { +bind Spinbox <Key> { ::tk::EntryInsert %W %A } # Ignore all Alt, Meta, and Control keypresses unless explicitly bound. # Otherwise, if a widget binding for one of these is defined, the -# <KeyPress> class binding will also fire and insert the character, +# <Key> class binding will also fire and insert the character, # which is wrong. Ditto for Escape, Return, and Tab. -bind Spinbox <Alt-KeyPress> {# nothing} -bind Spinbox <Meta-KeyPress> {# nothing} -bind Spinbox <Control-KeyPress> {# nothing} +bind Spinbox <Alt-Key> {# nothing} +bind Spinbox <Meta-Key> {# nothing} +bind Spinbox <Control-Key> {# nothing} bind Spinbox <Escape> {# nothing} bind Spinbox <Return> {# nothing} bind Spinbox <KP_Enter> {# nothing} @@ -219,7 +219,7 @@ bind Spinbox <Tab> {# nothing} bind Spinbox <Prior> {# nothing} bind Spinbox <Next> {# nothing} if {[tk windowingsystem] eq "aqua"} { - bind Spinbox <Command-KeyPress> {# nothing} + bind Spinbox <Command-Key> {# nothing} } # On Windows, paste is done using Shift-Insert. Shift-Insert already @@ -280,7 +280,7 @@ bind Spinbox <Meta-Delete> { # A few additional bindings of my own. -bind Spinbox <2> { +bind Spinbox <Button-2> { if {!$tk_strictMotif} { ::tk::EntryScanMark %W %x } |