Merge pull request #40 from zetamatta/master

Fix: the first key after terminal-window activated was input twice.