]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/tcl-lib/bindings.tcl
Security-54.1.tar.gz
[apple/security.git] / SecuritySNACCRuntime / tcl-lib / bindings.tcl
1 # file: bindings.tcl
2
3 #\[sep]-----------------------------------------------------------------------------------------------------------------------------
4 proc bit_string_entry_bindings {entry} \
5 {
6 bind $entry <Any-Key> { }
7 # bind $entry <Key-Return> {puts return}
8 bind $entry <Key-0> {%W insert insert %A}
9 bind $entry <Key-1> {%W insert insert %A}
10 bind $entry <Control-u> [bind Entry <Control-u>]
11 bind $entry <Control-v> [bind Entry <Control-v>]
12 bind $entry <Control-d> [bind Entry <Control-d>]
13 bind $entry <Delete> [bind Entry <Delete>]
14 bind $entry <Backspace> [bind Entry <Backspace>]
15 bind $entry <Left> {%W icursor [expr [%W index insert] -1]}
16 bind $entry <Right> {%W icursor [expr [%W index insert] +1]}
17 }
18
19 #\[sep]-----------------------------------------------------------------------------------------------------------------------------
20 proc int_entry_bindings {entry} \
21 {
22 bit_string_entry_bindings $entry
23 for {set i 2} {$i < 10} {incr i} \
24 {
25 bind $entry <Key-$i> {%W insert insert %A}
26 bind $entry <Key-KP_$i> {%W insert insert %A}
27 }
28 bind $entry <Key-minus> {%W insert insert %A}
29 bind $entry <Key-KP_Subtract> {%W insert insert %A}
30 }