I can see that Ctrl+left/right jumps to the beginning/end of line. How to change this to Cmd+left/right arrow
explained in https://aaronaddleman.com/articles/hexcodes-and-iterm/
you can use xxd -psd to get key hex code.
xxd -psd