summaryrefslogtreecommitdiffstats
path: root/library/spinbox.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/spinbox.tcl')
-rw-r--r--library/spinbox.tcl57
1 files changed, 20 insertions, 37 deletions
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index cb501ee..641584d 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -120,52 +120,52 @@ bind Spinbox <Control-1> {
%W icursor @%x
}
-bind Spinbox <Up> {
+bind Spinbox <<PrevLine>> {
%W invoke buttonup
}
-bind Spinbox <Down> {
+bind Spinbox <<NextLine>> {
%W invoke buttondown
}
-bind Spinbox <Left> {
+bind Spinbox <<PrevChar>> {
::tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
}
-bind Spinbox <Right> {
+bind Spinbox <<NextChar>> {
::tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
}
-bind Spinbox <Shift-Left> {
+bind Spinbox <<SelectPrevChar>> {
::tk::EntryKeySelect %W [expr {[%W index insert] - 1}]
::tk::EntrySeeInsert %W
}
-bind Spinbox <Shift-Right> {
+bind Spinbox <<SelectNextChar>> {
::tk::EntryKeySelect %W [expr {[%W index insert] + 1}]
::tk::EntrySeeInsert %W
}
-bind Spinbox <Control-Left> {
+bind Spinbox <<PrevWord>> {
::tk::EntrySetCursor %W [::tk::EntryPreviousWord %W insert]
}
-bind Spinbox <Control-Right> {
+bind Spinbox <<NextWord>> {
::tk::EntrySetCursor %W [::tk::EntryNextWord %W insert]
}
-bind Spinbox <Shift-Control-Left> {
+bind Spinbox <<SelectPrevWord>> {
::tk::EntryKeySelect %W [::tk::EntryPreviousWord %W insert]
::tk::EntrySeeInsert %W
}
-bind Spinbox <Shift-Control-Right> {
+bind Spinbox <<SelectNextWord>> {
::tk::EntryKeySelect %W [::tk::EntryNextWord %W insert]
::tk::EntrySeeInsert %W
}
-bind Spinbox <Home> {
+bind Spinbox <<LineStart>> {
::tk::EntrySetCursor %W 0
}
-bind Spinbox <Shift-Home> {
+bind Spinbox <<SelectLineStart>> {
::tk::EntryKeySelect %W 0
::tk::EntrySeeInsert %W
}
-bind Spinbox <End> {
+bind Spinbox <<LineEnd>> {
::tk::EntrySetCursor %W end
}
-bind Spinbox <Shift-End> {
+bind Spinbox <<SelectLineEnd>> {
::tk::EntryKeySelect %W end
::tk::EntrySeeInsert %W
}
@@ -193,10 +193,10 @@ bind Spinbox <Control-Shift-space> {
bind Spinbox <Shift-Select> {
%W selection adjust insert
}
-bind Spinbox <Control-slash> {
+bind Spinbox <<SelectAll>> {
%W selection range 0 end
}
-bind Spinbox <Control-backslash> {
+bind Spinbox <<SelectNone>> {
%W selection clear
}
bind Spinbox <KeyPress> {
@@ -215,6 +215,8 @@ bind Spinbox <Escape> {# nothing}
bind Spinbox <Return> {# nothing}
bind Spinbox <KP_Enter> {# nothing}
bind Spinbox <Tab> {# nothing}
+bind Spinbox <Prior> {# nothing}
+bind Spinbox <Next> {# nothing}
if {[tk windowingsystem] eq "aqua"} {
bind Spinbox <Command-KeyPress> {# nothing}
}
@@ -229,31 +231,11 @@ if {[tk windowingsystem] ne "win32"} {
# Additional emacs-like bindings:
-bind Spinbox <Control-a> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W 0
- }
-}
-bind Spinbox <Control-b> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
- }
-}
bind Spinbox <Control-d> {
if {!$tk_strictMotif} {
%W delete insert
}
}
-bind Spinbox <Control-e> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W end
- }
-}
-bind Spinbox <Control-f> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
- }
-}
bind Spinbox <Control-h> {
if {!$tk_strictMotif} {
::tk::EntryBackspace %W
@@ -394,7 +376,8 @@ proc ::tk::spinbox::ButtonDown {w x y} {
$w selection clear
}
default {
- return -code error "unknown spinbox element \"$Priv(element)\""
+ return -code error -errorcode {TK SPINBOX UNKNOWN_ELEMENT} \
+ "unknown spinbox element \"$Priv(element)\""
}
}
}