#@+leo
#@+node:0::@file plugins/mod_trace_keys.py
#@+body
"""trace keystrokes"""

from leoPlugins import *
from leoGlobals import *


#@+others
#@+node:1::onKey
#@+body
def onKey (tag,keywords):

	ch = keywords.get("ch")
	if ch and len(ch) > 0:
		es("key",`ch`)
#@-body
#@-node:1::onKey
#@-others


if 1: # Register the handlers...
	registerHandler(("bodykey1","bodykey2","headkey1","headkey2"), onKey)
	
	import mod_trace_keys
	es("...key tracing v1.1: " + plugin_date(mod_trace_keys))
#@-body
#@-node:0::@file plugins/mod_trace_keys.py
#@-leo
