Remove zws in key handlers they could affect.
Improve detection of range at begin/end of block.