The below example will show you how to use Ctrl + k as a keyboard shortcut to execute the following key sequence when you are in insert mode : <esc>:wq<Enter>
Example
- open
~/.vimrcfile - go to the bottom of the file
- add the following line
inoremap <C-k> <esc>:wq<Enter> - save and close file
- exit and restart terminal