Rewritten key handling logic, update docs.

(Requires weechat/weechat@1f65f80db4)