Documenting Problems That Were Difficult To Find The Answer To

If Tkdiff Doesn’t Appear To Accept Keyboard Shortcuts

I have, for the best part of a decade, loved tkdiff. It is a simple graphical diff tool written in Tcl/Tk that works on both Windows and Linux.

However v4.2 doesn’t appear to accept keyboard commands (such a “n” for next diff, “p” for previous diff, and “q” for quit). Actually, it does, but you have to select the diff text frame in order for the application to process the keys. You can do this either by clicking on the diff text, or pressing shift-<tab> twice.

A more permanent fix is adding the bold line to the main proc:

proc main {} {
    wm deiconify .
    focus -force $w(LeftText)
    update idletasks

… which will force the left hand text panel to take focus on start-up – thereby accepting keys from the keyboard, such as “q” for quit.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: