summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/entry.tcl42
-rw-r--r--library/ttk/notebook.tcl4
-rw-r--r--library/ttk/scale.tcl23
-rw-r--r--library/ttk/treeview.tcl2
4 files changed, 35 insertions, 36 deletions
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl
index 2c9fbc8..be2299f 100644
--- a/library/ttk/entry.tcl
+++ b/library/ttk/entry.tcl
@@ -42,7 +42,7 @@ option add *TEntry.cursor [ttk::cursor text]
#
# <Control-Key-space>, <Control-Shift-Key-space>,
# <Key-Select>, <Shift-Key-Select>:
-# ttk::entry widget doesn't use selection anchor.
+# Ttk entry widget doesn't use selection anchor.
# <Key-Insert>:
# Inserts PRIMARY selection (on non-Windows platforms).
# This is inconsistent with typical platform bindings.
@@ -78,7 +78,7 @@ bind TEntry <B1-Leave> { ttk::Repeatedly ttk::entry::AutoScroll %W }
bind TEntry <B1-Enter> { ttk::CancelRepeat }
bind TEntry <ButtonRelease-1> { ttk::CancelRepeat }
-bind TEntry <Control-ButtonPress-1> {
+bind TEntry <<ToggleSelection>> {
%W instate {!readonly !disabled} { %W icursor @%x ; focus %W }
}
@@ -93,22 +93,22 @@ bind TEntry <<PasteSelection>> { ttk::entry::ScanRelease %W %x }
## Keyboard navigation bindings:
#
-bind TEntry <Key-Left> { ttk::entry::Move %W prevchar }
-bind TEntry <Key-Right> { ttk::entry::Move %W nextchar }
-bind TEntry <Control-Key-Left> { ttk::entry::Move %W prevword }
-bind TEntry <Control-Key-Right> { ttk::entry::Move %W nextword }
-bind TEntry <Key-Home> { ttk::entry::Move %W home }
-bind TEntry <Key-End> { ttk::entry::Move %W end }
+bind TEntry <<PrevChar>> { ttk::entry::Move %W prevchar }
+bind TEntry <<NextChar>> { ttk::entry::Move %W nextchar }
+bind TEntry <<PrevWord>> { ttk::entry::Move %W prevword }
+bind TEntry <<NextWord>> { ttk::entry::Move %W nextword }
+bind TEntry <<LineStart>> { ttk::entry::Move %W home }
+bind TEntry <<LineEnd>> { ttk::entry::Move %W end }
-bind TEntry <Shift-Key-Left> { ttk::entry::Extend %W prevchar }
-bind TEntry <Shift-Key-Right> { ttk::entry::Extend %W nextchar }
-bind TEntry <Shift-Control-Key-Left> { ttk::entry::Extend %W prevword }
-bind TEntry <Shift-Control-Key-Right> { ttk::entry::Extend %W nextword }
-bind TEntry <Shift-Key-Home> { ttk::entry::Extend %W home }
-bind TEntry <Shift-Key-End> { ttk::entry::Extend %W end }
+bind TEntry <<SelectPrevChar>> { ttk::entry::Extend %W prevchar }
+bind TEntry <<SelectNextChar>> { ttk::entry::Extend %W nextchar }
+bind TEntry <<SelectPrevWord>> { ttk::entry::Extend %W prevword }
+bind TEntry <<SelectNextWord>> { ttk::entry::Extend %W nextword }
+bind TEntry <<SelectLineStart>> { ttk::entry::Extend %W home }
+bind TEntry <<SelectLineEnd>> { ttk::entry::Extend %W end }
-bind TEntry <Control-Key-slash> { %W selection range 0 end }
-bind TEntry <Control-Key-backslash> { %W selection clear }
+bind TEntry <<SelectAll>> { %W selection range 0 end }
+bind TEntry <<SelectNone>> { %W selection clear }
bind TEntry <<TraverseIn>> { %W selection range 0 end; %W icursor end }
@@ -136,16 +136,12 @@ if {[tk windowingsystem] eq "aqua"} {
bind TEntry <Command-KeyPress> {# nothing}
}
# Tk-on-Cocoa generates characters for these two keys. [Bug 2971663]
-bind TEntry <Down> {# nothing}
-bind TEntry <Up> {# nothing}
+bind TEntry <<PrevLine>> {# nothing}
+bind TEntry <<NextLine>> {# nothing}
## Additional emacs-like bindings:
#
-bind TEntry <Control-Key-a> { ttk::entry::Move %W home }
-bind TEntry <Control-Key-b> { ttk::entry::Move %W prevchar }
-bind TEntry <Control-Key-d> { ttk::entry::Delete %W }
-bind TEntry <Control-Key-e> { ttk::entry::Move %W end }
-bind TEntry <Control-Key-f> { ttk::entry::Move %W nextchar }
+bind TEntry <Control-Key-d> { ttk::entry::Delete %W }
bind TEntry <Control-Key-h> { ttk::entry::Backspace %W }
bind TEntry <Control-Key-k> { %W delete insert end }
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl
index d424b6c..72b85e6 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -108,7 +108,7 @@ proc ttk::notebook::enableTraversal {nb} {
bind $top <Control-Key-Next> {+ttk::notebook::TLCycleTab %W 1}
bind $top <Control-Key-Prior> {+ttk::notebook::TLCycleTab %W -1}
bind $top <Control-Key-Tab> {+ttk::notebook::TLCycleTab %W 1}
- bind $top <Shift-Control-Key-Tab> {+ttk::notebook::TLCycleTab %W -1}
+ bind $top <Control-Shift-Key-Tab> {+ttk::notebook::TLCycleTab %W -1}
catch {
bind $top <Control-Key-ISO_Left_Tab> {+ttk::notebook::TLCycleTab %W -1}
}
@@ -170,7 +170,7 @@ proc ttk::notebook::EnclosingNotebook {w} {
}
# TLCycleTab --
-# toplevel binding procedure for Control-Tab / Shift-Control-Tab
+# toplevel binding procedure for Control-Tab / Control-Shift-Tab
# Select the next/previous tab in the nearest ancestor notebook.
#
proc ttk::notebook::TLCycleTab {w dir} {
diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl
index 4a534de..62c85bf 100644
--- a/library/ttk/scale.tcl
+++ b/library/ttk/scale.tcl
@@ -21,16 +21,19 @@ bind TScale <ButtonPress-3> { ttk::scale::Jump %W %x %y }
bind TScale <B3-Motion> { ttk::scale::Drag %W %x %y }
bind TScale <ButtonRelease-3> { ttk::scale::Release %W %x %y }
-bind TScale <Left> { ttk::scale::Increment %W -1 }
-bind TScale <Up> { ttk::scale::Increment %W -1 }
-bind TScale <Right> { ttk::scale::Increment %W 1 }
-bind TScale <Down> { ttk::scale::Increment %W 1 }
-bind TScale <Control-Left> { ttk::scale::Increment %W -10 }
-bind TScale <Control-Up> { ttk::scale::Increment %W -10 }
-bind TScale <Control-Right> { ttk::scale::Increment %W 10 }
-bind TScale <Control-Down> { ttk::scale::Increment %W 10 }
-bind TScale <Home> { %W set [%W cget -from] }
-bind TScale <End> { %W set [%W cget -to] }
+## Keyboard navigation bindings:
+#
+bind TScale <<LineStart>> { %W set [%W cget -from] }
+bind TScale <<LineEnd>> { %W set [%W cget -to] }
+
+bind TScale <<PrevChar>> { ttk::scale::Increment %W -1 }
+bind TScale <<PrevLine>> { ttk::scale::Increment %W -1 }
+bind TScale <<NextChar>> { ttk::scale::Increment %W 1 }
+bind TScale <<NextLine>> { ttk::scale::Increment %W 1 }
+bind TScale <<PrevWord>> { ttk::scale::Increment %W -10 }
+bind TScale <<PrevPara>> { ttk::scale::Increment %W -10 }
+bind TScale <<NextWord>> { ttk::scale::Increment %W 10 }
+bind TScale <<NextPara>> { ttk::scale::Increment %W 10 }
proc ttk::scale::Press {w x y} {
variable State
diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl
index 1160e9b..8772587 100644
--- a/library/ttk/treeview.tcl
+++ b/library/ttk/treeview.tcl
@@ -43,7 +43,7 @@ bind Treeview <KeyPress-space> { ttk::treeview::ToggleFocus %W }
bind Treeview <Shift-ButtonPress-1> \
{ ttk::treeview::Select %W %x %y extend }
-bind Treeview <Control-ButtonPress-1> \
+bind Treeview <<ToggleSelection>> \
{ ttk::treeview::Select %W %x %y toggle }
ttk::copyBindings TtkScrollable Treeview