add keymapping 'q' and tweak ScratchBuffer