Hexchat closing on C-w is such a pain! It can't be scripted away either because it's hardcoded in the source. I haven't looked into this for some time but there does seem to have been some updates.
One of the things I appreciate about macOS is that it implements some of the emacs behavior (C-a, C-e, C-k). Unfortunately not C-y, and non of the M- ones work since that's for special characters. I understand they originally come from the readline library.
In other words ctrl-w is "kill," which is what most people would think of as "cut," and ctrl-y is "yank," which is what most people would think of as "paste."