Had a working version, but right now a new phrase dictionary holds me up. The key-events works as long as the cursor is in the "typing pane".