added Diger's minimize by ESCAPE and switchable sendWithEnter