Only the Windows console (cmd.exe) treats M-RET
in that fashion; run your shell, and Emacs, in a proper terminal emulator such as mintty
or rxvt
, to solve the problem and get a much more pleasant experience besides. (mintty
comes with Cygwin by default, and is considerably better in my experience than rxvt
, xterm
, or any other terminal emulator available in the Cygwin package manager; unlike those relics of a bygone era, mintty
has capabilities roughly on par with modern Linux terminal emulators.)
If you want to get really fancy, which I recommend, then install an X server -- Cygwin packages one, and there's also the third-party Xming version; I've had better results with Xming, but haven't tried Cygwin's X server in long enough that it's probably just as good by now -- and run Emacs in graphical mode, which not only resolves the M-RET
problem but also gives you proper color and font support.
possible duplicate of Change CTRL-X, -C, and -V hotkeys in Windows to different keys also see: http://superuser.com/questions/107807/is-there-a-way-to-unhook-a-global-hotkey-in-windows?rq=1, http://superuser.com/questions/230599/windows-7-64-bit-remove-global-hotkey-created-by-unknown-application?rq=1, http://superuser.com/questions/130109/how-can-i-disable-control-w-in-windows-xp?rq=1, etc. Short answer: use Autohotkey. ;)
– Ƭᴇcʜιᴇ007 – 2013-05-30T16:33:29.820@techie007 Not a duplicate; overriding
M-RET
via AHK or similar won't solve the problem, which in any case has only to do with running Emacs in a Windows console anyway -- see my answer. – Aaron Miller – 2013-05-30T16:34:32.233The problem here is it's an XY problem. But as-is, the question is "How do I override Windows' hotkeys", and therefore it's a dupe (IMO). :)
– Ƭᴇcʜιᴇ007 – 2013-05-30T16:38:58.627@techie007 I don't know if I even agree that it's an XY problem; I'm not sure how it could've been asked differently without prior knowledge, which the asker didn't have, that the observed
M-RET
behavior is specific to the Windows console and not a systemwide shortcut like the CUA stuff discussed in the first question you linked. That being the case, I maintain the contention that it's not a dupe, and the correct answer, as detailed below, is not "use AutoHotkey" but "use a real terminal emulator". :) – Aaron Miller – 2013-05-30T16:43:04.107Perhaps something like "...However, Windows uses Alt-Enter to toggle full-screen of a window so it conflicts. How can I avoid this conflict?" instead of "How can I disable Alt-Enter in Windows?" – Ƭᴇcʜιᴇ007 – 2013-05-30T16:45:16.530
@techie007 I've edited the title to something, maybe, a bit more problem-oriented. – sdasdadas – 2013-05-30T16:56:03.257
@sdasdadas Nice, and I just edited the body to try and bring it more in line with the actual problem as well. :) This is a reason why it takes 5 people to vote something closed, so you have time to correct it. ;) – Ƭᴇcʜιᴇ007 – 2013-05-30T17:01:24.373