.d.csr.csr.l configure -text {adjust}
place .d.csr.csr -x [expr {$cur*$mul - 7}]
bind_key space { othercursor }
- bind_leftright cur_$z1 0 [expr {$cols-1}]
+ bind_leftright_q cur_$z1 0 [expr {$cols-1}]
if {[llength $glyphsdone]} {
bind_key Tab { set cur_mode already; recursor }
} else {
{Space {switch to moving other cursor}}
{Return {confirm location, enter letter(s)}}
{Tab {switch to correcting earlier ocr}}
+ {Q {quit and abandon OCR run}}
}
}
proc othercursor {} {
place .d.csr.csr -x [expr {$rmax*$mul-3}]
bind_key Return {}
bind_key space {}
- bind_leftright cur_already 0 [expr {[llength $glyphsdone]/4-1}]
+ bind_leftright_q cur_already 0 [expr {[llength $glyphsdone]/4-1}]
bind_key Tab { bind_key Delete {}; set cur_mode 1; recursor }
bind_key Delete {
RETURN_RESULT DELETE [lrange $glyphsdone \
{{<- ->} {move cursor, selecting glyph to correct}}
{Del {clear this glyph from the recognition database}}
{Tab {switch to selecting area to define as new glyph}}
+ {Q {quit and abandon OCR run}}
}
}
foreach k [array names keybindings] { bind_key $k {} }
}
-proc bind_leftright {var min max} {
+proc bind_leftright_q {var min max} {
bind_key Left [list leftright $var $min $max -1]
bind_key Right [list leftright $var $min $max +1]
+ bind_key q {
+ puts stderr "\nCharacter resolver quitting as you requested."
+ exit 1
+ }
}
proc leftright {var min max inc} {
upvar #0 $var v