2

When pressing both C at the same time, the combination is recognized as C-M on a Win7 machine and Emacs 24.5.

I've stumbled on this by mistake while pressing C-C-SPC. While on a Linux machine, this is the same as C-SPC, on a Windows machine this is recognized as C-M-SPC. This is very handy, but I'm not able to reproduce the behaviour on Linux.

Any ideas on how I might achieve this on Linux or why is it working only on Windows?

Update for Windows:

  • If I start emacs with no init files (emacs -q), the behavior is still present (i.e. C-C-SPC is still recognized as C-M-SPC)
  • If I start emacs without the window system (emacs -nw) the behavior disappears (i.e C-C-SPC is recognized as C-SPC), as expected.
6
  • This is something handled at the OS level rather than by emacs, I believe.
    – Dan
    Commented Feb 19, 2016 at 20:34
  • @Dan, donno, but pressing C-C-DEL outside of emacs, does not invoke the C-M-DEL, so Windows doesn't do this conversion for the ctrl+alt+del, for example.
    – mihai
    Commented Feb 19, 2016 at 20:39
  • Just to check -- it's not the case that in Emacs, one of the control keys is mapped to Meta, is it?
    – zck
    Commented Feb 21, 2016 at 19:39
  • 1
    @zck, no, it is not. I use both Ctrl keys, the left one for navigating, for example, the right one for saving, find-file, etc. While trying to set mark, I accidentally pressed both Ctrls at the same time. Instead of set-mark I got select-word, or something like that. Two seconds later and a C-h k, indeed, C-C-SPC was actually a C-M-SPC and not a C-SPC as I was expecting, and as is the case on Linux.
    – mihai
    Commented Feb 22, 2016 at 5:15
  • Learn something new everyday! I never thought to hold both Control keys down as modifiers. I would have thought that it was redundant. Whoodathunk?
    – Drew
    Commented Aug 15, 2016 at 1:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.