feature(terminal) added keyup/keydown handling