summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/tk.tcl')
-rw-r--r--library/tk.tcl131
1 files changed, 79 insertions, 52 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index 928fc2e..7ef25ec 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -307,9 +307,9 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} {
set op add
}
- event $op <<Cut>> <Control-Key-w>
- event $op <<Copy>> <Meta-Key-w>
- event $op <<Paste>> <Control-Key-y>
+ event $op <<Cut>> <Control-Key-w> <Shift-Key-Delete>
+ event $op <<Copy>> <Meta-Key-w> <Control-Key-Insert>
+ event $op <<Paste>> <Control-Key-y> <Shift-Key-Insert>
event $op <<Undo>> <Control-underscore>
}
@@ -358,29 +358,39 @@ if {![llength [info command tk_chooseDirectory]]} {
switch -exact -- [tk windowingsystem] {
"x11" {
- event add <<Cut>> <Control-Key-x> <Key-F20> <Control-Lock-Key-X>
- event add <<Copy>> <Control-Key-c> <Key-F16> <Control-Lock-Key-C>
- event add <<Paste>> <Control-Key-v> <Key-F18> <Control-Lock-Key-V>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
- event add <<Redo>> <Control-Key-Z> <Control-Lock-Key-z>
- event add <<ContextMenu>> <Button-3>
+ event add <<Cut>> <Control-Key-x> <Key-F20> <Control-Lock-Key-X>
+ event add <<Copy>> <Control-Key-c> <Key-F16> <Control-Lock-Key-C>
+ event add <<Paste>> <Control-Key-v> <Key-F18> <Control-Lock-Key-V>
+ event add <<PasteSelection>> <ButtonRelease-2>
+ event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
+ event add <<Redo>> <Control-Key-Z> <Control-Lock-Key-z>
+ event add <<ContextMenu>> <Button-3>
if {[info exists tcl_platform(os)] && $tcl_platform(os) eq "Darwin"} {
- event add <<ContextMenu>> <Button-2>
+ event add <<ContextMenu>> <Button-2>
}
- event add <<NextChar>> <Right>
- event add <<SelectNextChar>> <Shift-Right>
- event add <<PrevChar>> <Left>
- event add <<SelectPrevChar>> <Shift-Left>
+ event add <<SelectAll>> <Control-Key-slash>
+ event add <<SelectNone>> <Control-Key-backslash>
+ event add <<NextChar>> <Right> <Control-Key-f> <Control-Lock-Key-F>
+ event add <<SelectNextChar>> <Shift-Right> <Control-Key-F> <Control-Lock-Key-f>
+ event add <<PrevChar>> <Left> <Control-Key-b> <Control-Lock-Key-B>
+ event add <<SelectPrevChar>> <Shift-Left> <Control-Key-B> <Control-Lock-Key-b>
event add <<NextWord>> <Control-Right>
- event add <<SelectNextWord>> <Shift-Control-Right>
+ event add <<SelectNextWord>> <Control-Shift-Right>
event add <<PrevWord>> <Control-Left>
- event add <<SelectPrevWord>> <Shift-Control-Left>
- event add <<LineStart>> <Home>
- event add <<SelectLineStart>> <Shift-Home>
- event add <<LineEnd>> <End>
- event add <<SelectLineEnd>> <Shift-End>
+ event add <<SelectPrevWord>> <Control-Shift-Left>
+ event add <<LineStart>> <Home> <Control-Key-a> <Control-Lock-Key-A>
+ event add <<SelectLineStart>> <Shift-Home> <Control-Key-A> <Control-Lock-Key-a>
+ event add <<LineEnd>> <End> <Control-Key-e> <Control-Lock-Key-E>
+ event add <<SelectLineEnd>> <Shift-End> <Control-Key-E> <Control-Lock-Key-e>
+ event add <<PrevLine>> <Up> <Control-Key-p> <Control-Lock-Key-P>
+ event add <<NextLine>> <Down> <Control-Key-n> <Control-Lock-Key-N>
+ event add <<SelectPrevLine>> <Shift-Up> <Control-Key-P> <Control-Lock-Key-p>
+ event add <<SelectNextLine>> <Shift-Down> <Control-Key-N> <Control-Lock-Key-n>
+ event add <<PrevPara>> <Control-Up>
+ event add <<NextPara>> <Control-Down>
+ event add <<SelectPrevPara>> <Control-Shift-Up>
+ event add <<SelectPrevPara>> <Control-Shift-Down>
# Some OS's define a goofy (as in, not <Shift-Tab>) keysym that is
# returned when the user presses <Shift-Tab>. In order for tab
@@ -399,56 +409,73 @@ switch -exact -- [tk windowingsystem] {
set ::tk::AlwaysShowSelection 1
}
"win32" {
- event add <<Cut>> <Control-Key-x> <Shift-Key-Delete> \
- <Control-Lock-Key-X>
- event add <<Copy>> <Control-Key-c> <Control-Key-Insert> \
- <Control-Lock-Key-C>
- event add <<Paste>> <Control-Key-v> <Shift-Key-Insert> \
- <Control-Lock-Key-V>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
- event add <<Redo>> <Control-Key-y> <Control-Lock-Key-Y>
- event add <<ContextMenu>> <Button-3>
-
+ event add <<Cut>> <Control-Key-x> <Shift-Key-Delete> <Control-Lock-Key-X>
+ event add <<Copy>> <Control-Key-c> <Control-Key-Insert> <Control-Lock-Key-C>
+ event add <<Paste>> <Control-Key-v> <Shift-Key-Insert> <Control-Lock-Key-V>
+ event add <<PasteSelection>> <ButtonRelease-2>
+ event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
+ event add <<Redo>> <Control-Key-y> <Control-Lock-Key-Y>
+ event add <<ContextMenu>> <Button-3>
+
+ event add <<SelectAll>> <Control-Key-slash>
+ event add <<SelectNone>> <Control-Key-backslash>
event add <<NextChar>> <Right>
event add <<SelectNextChar>> <Shift-Right>
event add <<PrevChar>> <Left>
event add <<SelectPrevChar>> <Shift-Left>
event add <<NextWord>> <Control-Right>
- event add <<SelectNextWord>> <Shift-Control-Right>
+ event add <<SelectNextWord>> <Control-Shift-Right>
event add <<PrevWord>> <Control-Left>
- event add <<SelectPrevWord>> <Shift-Control-Left>
- event add <<LineStart>> <Home>
+ event add <<SelectPrevWord>> <Control-Shift-Left>
+ event add <<LineStart>> <Home> <Control-Key-a> <Control-Lock-Key-A>
event add <<SelectLineStart>> <Shift-Home>
- event add <<LineEnd>> <End>
+ event add <<LineEnd>> <End> <Control-Key-e> <Control-Lock-Key-E>
event add <<SelectLineEnd>> <Shift-End>
+ event add <<PrevLine>> <Up>
+ event add <<NextLine>> <Down>
+ event add <<SelectPrevLine>> <Shift-Up>
+ event add <<SelectNextLine>> <Shift-Down>
+ event add <<PrevPara>> <Control-Up>
+ event add <<NextPara>> <Control-Down>
+ event add <<SelectPrevPara>> <Control-Shift-Up>
+ event add <<SelectPrevPara>> <Control-Shift-Down>
}
"aqua" {
- event add <<Cut>> <Command-Key-x> <Key-F2> <Control-Lock-Key-X>
- event add <<Copy>> <Command-Key-c> <Key-F3> <Control-Lock-Key-C>
- event add <<Paste>> <Command-Key-v> <Key-F4> <Control-Lock-Key-V>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Clear>> <Clear>
- event add <<Undo>> <Command-Key-z> <Control-Lock-Key-Z>
- event add <<Redo>> <Command-Key-y> <Control-Lock-Key-Y>
- event add <<ContextMenu>> <Button-2>
+ event add <<Cut>> <Command-Key-x> <Key-F2> <Control-Lock-Key-X>
+ event add <<Copy>> <Command-Key-c> <Key-F3> <Control-Lock-Key-C>
+ event add <<Paste>> <Command-Key-v> <Key-F4> <Control-Lock-Key-V>
+ event add <<PasteSelection>> <ButtonRelease-2>
+ event add <<Clear>> <Clear>
+ event add <<ContextMenu>> <Button-2>
# Official bindings
# See http://support.apple.com/kb/HT1343
- event add <<NextChar>> <Right>
- event add <<SelectNextChar>> <Shift-Right>
- event add <<PrevChar>> <Left>
- event add <<SelectPrevChar>> <Shift-Left>
+ event add <<SelectAll>> <Command-Key-a>
+ event add <<SelectNone>> <Option-Command-Key-a>
+ event add <<Undo>> <Command-Key-z> <Control-Lock-Key-Z>
+ event add <<Redo>> <Command-Key-Z> <Control-Lock-Key-z>
+ event add <<NextChar>> <Right> <Control-Key-f> <Control-Lock-Key-F>
+ event add <<SelectNextChar>> <Shift-Right> <Control-Key-F> <Control-Lock-Key-f>
+ event add <<PrevChar>> <Left> <Control-Key-b> <Control-Lock-Key-B>
+ event add <<SelectPrevChar>> <Shift-Left> <Control-Key-B> <Control-Lock-Key-b>
event add <<NextWord>> <Option-Right>
event add <<SelectNextWord>> <Shift-Option-Right>
event add <<PrevWord>> <Option-Left>
event add <<SelectPrevWord>> <Shift-Option-Left>
- event add <<SelectLineStart>> <Shift-Home> <Shift-Command-Left>
- event add <<SelectLineEnd>> <Shift-End> <Shift-Command-Right>
+ event add <<LineStart>> <Home> <Command-Left> <Control-Key-a> <Control-Lock-Key-A>
+ event add <<SelectLineStart>> <Shift-Home> <Shift-Command-Left> <Control-Key-A> <Control-Lock-Key-a>
+ event add <<LineEnd>> <End> <Command-Right> <Control-Key-e> <Control-Lock-Key-E>
+ event add <<SelectLineEnd>> <Shift-End> <Shift-Command-Right> <Control-Key-E> <Control-Lock-Key-e>
+ event add <<PrevLine>> <Up> <Control-Key-p> <Control-Lock-Key-P>
+ event add <<SelectPrevLine>> <Shift-Up> <Control-Key-P> <Control-Lock-Key-p>
+ event add <<NextLine>> <Down> <Control-Key-n> <Control-Lock-Key-N>
+ event add <<SelectNextLine>> <Shift-Down> <Control-Key-N> <Control-Lock-Key-n>
# Not official, but logical extensions of above. Also derived from
# bindings present in MS Word on OSX.
- event add <<LineStart>> <Home> <Command-Left>
- event add <<LineEnd>> <End> <Command-Right>
+ event add <<PrevPara>> <Option-Up>
+ event add <<NextPara>> <Option-Down>
+ event add <<SelectPrevPara>> <Shift-Option-Up>
+ event add <<SelectPrevPara>> <Shift-Option-Down>
}
}