if you try to change the binding of ctrl-m, with something like "/key bind ctrl-M /some command" this will also change the behaviour of the enter key, making it impossible to issue any new commands to weechat.
In my case I had to use weechat's fifo for reset keybinds.

The easy solution for avoid this is to fix ctrl-m to "/input return" and not be possible to change it.