diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/console.tcl | 14 | ||||
-rw-r--r-- | library/entry.tcl | 1 | ||||
-rw-r--r-- | library/spinbox.tcl | 15 | ||||
-rw-r--r-- | library/text.tcl | 13 | ||||
-rw-r--r-- | library/ttk/entry.tcl | 1 |
5 files changed, 26 insertions, 18 deletions
diff --git a/library/console.tcl b/library/console.tcl index 30c4d88..d8f7c5c 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -429,9 +429,13 @@ proc ::tk::ConsoleBind {w} { # <Keypress> class binding will also fire and insert the character # which is wrong. - bind Console <Alt-KeyPress> {# nothing } - bind Console <Meta-KeyPress> {# nothing} - bind Console <Control-KeyPress> {# nothing} + bind Console <Alt-Key> {# nothing } + bind Console <Meta-Key> {# nothing} + bind Console <Control-Key> {# nothing} + if {[tk windowingsystem] eq "aqua"} { + bind Console <Command-Key> {# nothing} + bind Console <Mod4-Key> {# nothing} + } foreach {ev key} { <<Console_NextImmediate>> <Control-Key-n> @@ -587,7 +591,7 @@ proc ::tk::ConsoleBind {w} { bind Console <Insert> { catch {tk::ConsoleInsert %W [::tk::GetSelection %W PRIMARY]} } - bind Console <KeyPress> { + bind Console <Key> { tk::ConsoleInsert %W %A } bind Console <F9> { @@ -650,7 +654,7 @@ proc ::tk::ConsoleBind {w} { } } - bind PostConsole <KeyPress> { + bind PostConsole <Key> { if {"%A" ne ""} { ::tk::console::TagProc %W } diff --git a/library/entry.tcl b/library/entry.tcl index 6539af7..4140c92 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -211,6 +211,7 @@ bind Entry <Prior> {# nothing} bind Entry <Next> {# nothing} if {[tk windowingsystem] eq "aqua"} { bind Entry <Command-Key> {# nothing} + bind Entry <Mod4-Key> {# nothing} } # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] bind Entry <<NextLine>> {# nothing} diff --git a/library/spinbox.tcl b/library/spinbox.tcl index 2b387d2..0e26644 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -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. +# Ignore all Alt, Meta, Control, and Mod4 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,8 @@ 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} + bind Spinbox <Mod4-Key> {# nothing} } # On Windows, paste is done using Shift-Insert. Shift-Insert already diff --git a/library/text.tcl b/library/text.tcl index d1f9b86..6cfe9d0 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -292,22 +292,23 @@ bind Text <<PasteSelection>> { bind Text <Insert> { catch {tk::TextInsert %W [::tk::GetSelection %W PRIMARY]} } -bind Text <KeyPress> { +bind Text <Key> { tk::TextInsert %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>. -bind Text <Alt-KeyPress> {# nothing } -bind Text <Meta-KeyPress> {# nothing} -bind Text <Control-KeyPress> {# nothing} +bind Text <Alt-Key> {# nothing } +bind Text <Meta-Key> {# nothing} +bind Text <Control-Key> {# nothing} bind Text <Escape> {# nothing} bind Text <KP_Enter> {# nothing} if {[tk windowingsystem] eq "aqua"} { - bind Text <Command-KeyPress> {# nothing} + bind Text <Command-Key> {# nothing} + bind Text <Mod4-Key> {# nothing} } # Additional emacs-like bindings: diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 4cdb5ac..12080a3 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -141,6 +141,7 @@ bind TEntry <Tab> {# nothing} # as a Command modifier. if {[tk windowingsystem] eq "aqua"} { bind TEntry <Command-Key> {# nothing} + bind TEntry <Mod4-Key> {# nothing} } # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] bind TEntry <<PrevLine>> {# nothing} |