Added sensible key handler