Fix for shift handling in chatbox

I used pull request #11 as the base for @9b976cf9b8, but I forgot
to fix this aspect of it.