cancel input when <C-c> or <Esc> is input
add test for cancel with <C-c> and <Esc>