From 9519ffb35649873f9567b3631d2680a2f90850ee Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 19 Apr 2022 19:50:10 +0000 Subject: Fix [8dd3d58c62]: macOS Aqua: Fn + e to access Emoji --- library/console.tcl | 14 +++++++++----- library/entry.tcl | 1 + library/spinbox.tcl | 15 ++++++++------- library/text.tcl | 13 +++++++------ 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} { # class binding will also fire and insert the character # which is wrong. - bind Console {# nothing } - bind Console {# nothing} - bind Console {# nothing} + bind Console {# nothing } + bind Console {# nothing} + bind Console {# nothing} + if {[tk windowingsystem] eq "aqua"} { + bind Console {# nothing} + bind Console {# nothing} + } foreach {ev key} { <> @@ -587,7 +591,7 @@ proc ::tk::ConsoleBind {w} { bind Console { catch {tk::ConsoleInsert %W [::tk::GetSelection %W PRIMARY]} } - bind Console { + bind Console { tk::ConsoleInsert %W %A } bind Console { @@ -650,7 +654,7 @@ proc ::tk::ConsoleBind {w} { } } - bind PostConsole { + bind PostConsole { 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 {# nothing} bind Entry {# nothing} if {[tk windowingsystem] eq "aqua"} { bind Entry {# nothing} + bind Entry {# nothing} } # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] bind Entry <> {# 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 <> { bind Spinbox <> { %W selection clear } -bind Spinbox { +bind Spinbox { ::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 -# class binding will also fire and insert the character, +# class binding will also fire and insert the character, # which is wrong. Ditto for Escape, Return, and Tab. -bind Spinbox {# nothing} -bind Spinbox {# nothing} -bind Spinbox {# nothing} +bind Spinbox {# nothing} +bind Spinbox {# nothing} +bind Spinbox {# nothing} bind Spinbox {# nothing} bind Spinbox {# nothing} bind Spinbox {# nothing} @@ -219,7 +219,8 @@ bind Spinbox {# nothing} bind Spinbox {# nothing} bind Spinbox {# nothing} if {[tk windowingsystem] eq "aqua"} { - bind Spinbox {# nothing} + bind Spinbox {# nothing} + bind Spinbox {# 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 <> { bind Text { catch {tk::TextInsert %W [::tk::GetSelection %W PRIMARY]} } -bind Text { +bind Text { 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 -# class binding will also fire and insert the character, +# class binding will also fire and insert the character, # which is wrong. Ditto for . -bind Text {# nothing } -bind Text {# nothing} -bind Text {# nothing} +bind Text {# nothing } +bind Text {# nothing} +bind Text {# nothing} bind Text {# nothing} bind Text {# nothing} if {[tk windowingsystem] eq "aqua"} { - bind Text {# nothing} + bind Text {# nothing} + bind Text {# 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 {# nothing} # as a Command modifier. if {[tk windowingsystem] eq "aqua"} { bind TEntry {# nothing} + bind TEntry {# nothing} } # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] bind TEntry <> {# nothing} -- cgit v0.12