diff options
Diffstat (limited to 'library/console.tcl')
-rw-r--r-- | library/console.tcl | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/library/console.tcl b/library/console.tcl index 2d5e824..d882136 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -4,9 +4,9 @@ # can be used by non-unix systems that do not have built-in support # for shells. # -# Copyright (c) 1995-1997 Sun Microsystems, Inc. -# Copyright (c) 1998-2000 Ajuba Solutions. -# Copyright (c) 2007-2008 Daniel A. Steffen <das@users.sourceforge.net> +# Copyright © 1995-1997 Sun Microsystems, Inc. +# Copyright © 1998-2000 Ajuba Solutions. +# Copyright © 2007-2008 Daniel A. Steffen <das@users.sourceforge.net> # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -424,7 +424,7 @@ proc ::tk::ConsoleBind {w} { # gets and overhaul of how it handles input -- hobbs bind Console <Control-t> {} - # Ignore all Alt, Meta, and Control keypresses unless explicitly bound. + # Ignore all Alt, Meta, Control, Command, and Fn 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 # which is wrong. @@ -432,10 +432,8 @@ proc ::tk::ConsoleBind {w} { 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} - } + bind Console <Command-Key> {# nothing} + bind Console <Fn-Key> {# nothing} foreach {ev key} { <<Console_NextImmediate>> <Control-n> @@ -458,23 +456,16 @@ proc ::tk::ConsoleBind {w} { <<Console_Transpose>> <Control-t> <<Console_ClearLine>> <Control-u> <<Console_SaveCommand>> <Control-z> - <<Console_FontSizeIncr>> <Control-plus> + <<Console_FontSizeIncr>> <Control-+> <<Console_FontSizeDecr>> <Control-minus> + <<Console_FontSizeIncr>> <Command-+> + <<Console_FontSizeDecr>> <Command-minus> } { event add $ev $key bind Console $key {} } - if {[tk windowingsystem] eq "aqua"} { - foreach {ev key} { - <<Console_FontSizeIncr>> <Command-plus> - <<Console_FontSizeDecr>> <Command-minus> - } { - event add $ev $key - bind Console $key {} - } - if {$::tk::console::useFontchooser} { - bind Console <Command-t> [list ::tk::console::FontchooserToggle] - } + if {$::tk::console::useFontchooser} { + bind Console <Command-t> [list ::tk::console::FontchooserToggle] } bind Console <<Console_Expand>> { if {[%W compare insert > promptEnd]} { @@ -598,10 +589,8 @@ proc ::tk::ConsoleBind {w} { destroy {*}[winfo children .] source -encoding utf-8 [file join $tk_library console.tcl] } - if {[tk windowingsystem] eq "aqua"} { - bind Console <Command-q> { - exit - } + bind Console <Command-q> { + exit } bind Console <<Cut>> { ::tk::console::Cut %W } bind Console <<Copy>> { ::tk::console::Copy %W } @@ -633,7 +622,7 @@ proc ::tk::ConsoleBind {w} { ## ## Bindings for doing special things based on certain keys ## - bind PostConsole <parenright> { + bind PostConsole <)> { if {"\\" ne [%W get insert-2c]} { ::tk::console::MatchPair %W \( \) promptEnd } |