diff options
Diffstat (limited to 'library/text.tcl')
-rw-r--r-- | library/text.tcl | 76 |
1 files changed, 11 insertions, 65 deletions
diff --git a/library/text.tcl b/library/text.tcl index 8a72152..e59a86e 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -92,10 +92,10 @@ bind Text <<PrevChar>> { bind Text <<NextChar>> { tk::TextSetCursor %W insert+1displayindices } -bind Text <Up> { +bind Text <<PrevLine>> { tk::TextSetCursor %W [tk::TextUpDownLine %W -1] } -bind Text <Down> { +bind Text <<NextLine>> { tk::TextSetCursor %W [tk::TextUpDownLine %W 1] } bind Text <<SelectPrevChar>> { @@ -104,10 +104,10 @@ bind Text <<SelectPrevChar>> { bind Text <<SelectNextChar>> { tk::TextKeySelect %W [%W index {insert + 1displayindices}] } -bind Text <Shift-Up> { +bind Text <<SelectPrevLine>> { tk::TextKeySelect %W [tk::TextUpDownLine %W -1] } -bind Text <Shift-Down> { +bind Text <<SelectNextLine>> { tk::TextKeySelect %W [tk::TextUpDownLine %W 1] } bind Text <<PrevWord>> { @@ -116,10 +116,10 @@ bind Text <<PrevWord>> { bind Text <<NextWord>> { tk::TextSetCursor %W [tk::TextNextWord %W insert] } -bind Text <Control-Up> { +bind Text <<PrevPara>> { tk::TextSetCursor %W [tk::TextPrevPara %W insert] } -bind Text <Control-Down> { +bind Text <<NextPara>> { tk::TextSetCursor %W [tk::TextNextPara %W insert] } bind Text <<SelectPrevWord>> { @@ -128,10 +128,10 @@ bind Text <<SelectPrevWord>> { bind Text <<SelectNextWord>> { tk::TextKeySelect %W [tk::TextNextWord %W insert] } -bind Text <Control-Shift-Up> { +bind Text <<SelectPrevPara>> { tk::TextKeySelect %W [tk::TextPrevPara %W insert] } -bind Text <Control-Shift-Down> { +bind Text <<SelectNextPara>> { tk::TextKeySelect %W [tk::TextNextPara %W insert] } bind Text <Prior> { @@ -240,10 +240,10 @@ bind Text <Shift-Select> { set tk::Priv(selectMode) char tk::TextKeyExtend %W insert } -bind Text <Control-slash> { +bind Text <<SelectAll>> { %W tag add sel 1.0 end } -bind Text <Control-backslash> { +bind Text <<SelectNone>> { %W tag remove sel 1.0 end } bind Text <<Cut>> { @@ -287,31 +287,11 @@ if {[tk windowingsystem] eq "aqua"} { # Additional emacs-like bindings: -bind Text <Control-a> { - if {!$tk_strictMotif} { - tk::TextSetCursor %W {insert display linestart} - } -} -bind Text <Control-b> { - if {!$tk_strictMotif} { - tk::TextSetCursor %W insert-1displayindices - } -} bind Text <Control-d> { if {!$tk_strictMotif && [%W compare end != insert+1c]} { %W delete insert } } -bind Text <Control-e> { - if {!$tk_strictMotif} { - tk::TextSetCursor %W {insert display lineend} - } -} -bind Text <Control-f> { - if {!$tk_strictMotif} { - tk::TextSetCursor %W insert+1displayindices - } -} bind Text <Control-k> { if {!$tk_strictMotif && [%W compare end != insert+1c]} { if {[%W compare insert == {insert lineend}]} { @@ -321,22 +301,12 @@ bind Text <Control-k> { } } } -bind Text <Control-n> { - if {!$tk_strictMotif} { - tk::TextSetCursor %W [tk::TextUpDownLine %W 1] - } -} bind Text <Control-o> { if {!$tk_strictMotif} { %W insert insert \n %W mark set insert insert-1c } } -bind Text <Control-p> { - if {!$tk_strictMotif} { - tk::TextSetCursor %W [tk::TextUpDownLine %W -1] - } -} bind Text <Control-t> { if {!$tk_strictMotif} { tk::TextTranspose %W @@ -390,31 +360,7 @@ bind Text <Meta-Delete> { # Macintosh only bindings: if {[tk windowingsystem] eq "aqua"} { -bind Text <Option-Left> { - tk::TextSetCursor %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord] -} -bind Text <Option-Right> { - tk::TextSetCursor %W [tk::TextNextWord %W insert] -} -bind Text <Option-Up> { - tk::TextSetCursor %W [tk::TextPrevPara %W insert] -} -bind Text <Option-Down> { - tk::TextSetCursor %W [tk::TextNextPara %W insert] -} -bind Text <Shift-Option-Left> { - tk::TextKeySelect %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord] -} -bind Text <Shift-Option-Right> { - tk::TextKeySelect %W [tk::TextNextWord %W insert] -} -bind Text <Shift-Option-Up> { - tk::TextKeySelect %W [tk::TextPrevPara %W insert] -} -bind Text <Shift-Option-Down> { - tk::TextKeySelect %W [tk::TextNextPara %W insert] -} -bind Text <Control-v> { +bind Text <<Paste>> { tk::TextScrollPages %W 1 } |