Rewrite read function for keybindings

Following keybindings:
 - Ctrl+e Exit
 - Ctrl+u Clear line from beginning to cursor
 - Ctrl+k Clear line from cursor to end
 - Ctrl+a Move left by one word
 - Ctrl+d Move right by one word