@@ -1746,6 +1746,8 @@ proc show_error {w top msg} {
1746
1746
pack $w .ok -side bottom -fill x
1747
1747
bind $top <Visibility> " grab $top ; focus $top "
1748
1748
bind $top <Key-Return> " destroy $top "
1749
+ bind $top <Key-space> " destroy $top "
1750
+ bind $top <Key-Escape> " destroy $top "
1749
1751
tkwait window $top
1750
1752
}
1751
1753
@@ -1769,6 +1771,9 @@ proc confirm_popup msg {
1769
1771
button $w .cancel -text [mc Cancel] -command " destroy $w "
1770
1772
pack $w .cancel -side right -fill x
1771
1773
bind $w <Visibility> " grab $w ; focus $w "
1774
+ bind $w <Key-Return> " set confirm_ok 1; destroy $w "
1775
+ bind $w <Key-space> " set confirm_ok 1; destroy $w "
1776
+ bind $w <Key-Escape> " destroy $w "
1772
1777
tkwait window $w
1773
1778
return $confirm_ok
1774
1779
}
@@ -2611,6 +2616,7 @@ proc keys {} {
2611
2616
-justify left -bg white -border 2 -relief groove
2612
2617
pack $w .m -side top -fill both -padx 2 -pady 2
2613
2618
button $w .ok -text [mc " Close" ] -command " destroy $w " -default active
2619
+ bind $w <Key-Escape> [list destroy $w ]
2614
2620
pack $w .ok -side bottom
2615
2621
bind $w <Visibility> " focus $w .ok"
2616
2622
bind $w <Key-Escape> " destroy $w "
@@ -3533,6 +3539,7 @@ proc vieweditor {top n title} {
3533
3539
frame $top .buts
3534
3540
button $top .buts.ok -text [mc " OK" ] -command [list newviewok $top $n ]
3535
3541
button $top .buts.can -text [mc " Cancel" ] -command [list destroy $top ]
3542
+ bind $top <Escape> [list destroy $top ]
3536
3543
grid $top .buts.ok $top .buts.can
3537
3544
grid columnconfigure $top .buts 0 -weight 1 -uniform a
3538
3545
grid columnconfigure $top .buts 1 -weight 1 -uniform a
@@ -7793,6 +7800,8 @@ proc mkpatch {} {
7793
7800
frame $top .buts
7794
7801
button $top .buts.gen -text [mc " Generate" ] -command mkpatchgo
7795
7802
button $top .buts.can -text [mc " Cancel" ] -command mkpatchcan
7803
+ bind $top <Key-Return> mkpatchgo
7804
+ bind $top <Key-Escape> mkpatchcan
7796
7805
grid $top .buts.gen $top .buts.can
7797
7806
grid columnconfigure $top .buts 0 -weight 1 -uniform a
7798
7807
grid columnconfigure $top .buts 1 -weight 1 -uniform a
@@ -7864,6 +7873,8 @@ proc mktag {} {
7864
7873
frame $top .buts
7865
7874
button $top .buts.gen -text [mc " Create" ] -command mktaggo
7866
7875
button $top .buts.can -text [mc " Cancel" ] -command mktagcan
7876
+ bind $top <Key-Return> mktaggo
7877
+ bind $top <Key-Escape> mktagcan
7867
7878
grid $top .buts.gen $top .buts.can
7868
7879
grid columnconfigure $top .buts 0 -weight 1 -uniform a
7869
7880
grid columnconfigure $top .buts 1 -weight 1 -uniform a
@@ -7967,6 +7978,8 @@ proc writecommit {} {
7967
7978
frame $top .buts
7968
7979
button $top .buts.gen -text [mc " Write" ] -command wrcomgo
7969
7980
button $top .buts.can -text [mc " Cancel" ] -command wrcomcan
7981
+ bind $top <Key-Return> wrcomgo
7982
+ bind $top <Key-Escape> wrcomcan
7970
7983
grid $top .buts.gen $top .buts.can
7971
7984
grid columnconfigure $top .buts 0 -weight 1 -uniform a
7972
7985
grid columnconfigure $top .buts 1 -weight 1 -uniform a
@@ -8014,6 +8027,8 @@ proc mkbranch {} {
8014
8027
frame $top .buts
8015
8028
button $top .buts.go -text [mc " Create" ] -command [list mkbrgo $top ]
8016
8029
button $top .buts.can -text [mc " Cancel" ] -command " catch {destroy $top }"
8030
+ bind $top <Key-Return> [list mkbrgo $top ]
8031
+ bind $top <Key-Escape> " catch {destroy $top }"
8017
8032
grid $top .buts.go $top .buts.can
8018
8033
grid columnconfigure $top .buts 0 -weight 1 -uniform a
8019
8034
grid columnconfigure $top .buts 1 -weight 1 -uniform a
@@ -8138,6 +8153,7 @@ proc resethead {} {
8138
8153
button $w .ok -text [mc OK] -command " set confirm_ok 1; destroy $w "
8139
8154
pack $w .ok -side left -fill x -padx 20 -pady 20
8140
8155
button $w .cancel -text [mc Cancel] -command " destroy $w "
8156
+ bind $w <Key-Escape> [list destroy $w ]
8141
8157
pack $w .cancel -side right -fill x -padx 20 -pady 20
8142
8158
bind $w <Visibility> " grab $w ; focus $w "
8143
8159
tkwait window $w
@@ -8315,6 +8331,7 @@ proc showrefs {} {
8315
8331
pack $top .f.l -side left
8316
8332
grid $top .f - -sticky ew -pady 2
8317
8333
button $top .close -command [list destroy $top ] -text [mc " Close" ]
8334
+ bind $top <Key-Escape> [list destroy $top ]
8318
8335
grid $top .close -
8319
8336
grid columnconfigure $top 0 -weight 1
8320
8337
grid rowconfigure $top 0 -weight 1
@@ -9666,6 +9683,8 @@ proc choosefont {font which} {
9666
9683
frame $top .buts
9667
9684
button $top .buts.ok -text [mc " OK" ] -command fontok -default active
9668
9685
button $top .buts.can -text [mc " Cancel" ] -command fontcan -default normal
9686
+ bind $top <Key-Return> fontok
9687
+ bind $top <Key-Escape> fontcan
9669
9688
grid $top .buts.ok $top .buts.can
9670
9689
grid columnconfigure $top .buts 0 -weight 1 -uniform a
9671
9690
grid columnconfigure $top .buts 1 -weight 1 -uniform a
@@ -9845,6 +9864,8 @@ proc doprefs {} {
9845
9864
frame $top .buts
9846
9865
button $top .buts.ok -text [mc " OK" ] -command prefsok -default active
9847
9866
button $top .buts.can -text [mc " Cancel" ] -command prefscan -default normal
9867
+ bind $top <Key-Return> prefsok
9868
+ bind $top <Key-Escape> prefscan
9848
9869
grid $top .buts.ok $top .buts.can
9849
9870
grid columnconfigure $top .buts 0 -weight 1 -uniform a
9850
9871
grid columnconfigure $top .buts 1 -weight 1 -uniform a
0 commit comments