Gtk provides no simple way telling a calling program which entry widget contains the active keyboard focus. Specific widgets can be interrogated as to whether they possess keyboard input focus on either a global scale or simply within their own toplevel window. My own pet project is working on the translation of Chinese texts and the api of my translation editor will have multiple editable widgets on screen at any one time. Up till now I've used focus events to set a global variable identifying which widget has focus, but there are other ways. Today I just added the hasToplevelFocus and has hasGlobalFocus commands to the gnocl::text widget. There always was, of course the option to use cget -hasFocus. Here's my test script. #--------------- # test-chinese-punct-toolbar.tcl #--------------- # #!/bin/sh #\ exec tclsh "$0" "$@" package require Gnocl #--------------- # insert punc mark it currently active text #--------------- proc do_chn_punc { mark } { for...