32

Might be a very silly question to many folks out there, but I'm dense!

Ex:

Applying predefined layouts:

C-a M-1        switch to even-horizontal layout
C-a M-2        switch to even-vertical layout
C-a M-3        switch to main-horizontal layout
C-a M-4        switch to main-vertical layout
C-a M-5        switch to tiled layout
C-a space      switch to the next layout

What is M? If it's just shift+m then please take away my neckbeard right now. I thought it might be alt + key but that doesn't seem to be it.

2
  • 1
    They are the Alt key: so, to switch to tiled layout, you would press Ctrl-a Alt-5...
    – jasonwryan
    Nov 10 '14 at 21:27
  • thanks @jasonwryan - that's correct. Now it seems my problem is: why does Alt behave like Alt (and output alternate chars as opposed to doing the tmux command I thought it would)? Which isn't really a problem, but more of a configuration issue at this point.
    – Danny
    Nov 10 '14 at 22:13
34

It's the meta key. So M-1 is meta-1. (Just like how C-1 is control-1).

Now, when you look at your keyboard, you probably notice the distinct lack of any key actually labeled meta, at least if you have a normal PC keyboard. Depending on how your keyboard layout is set up, meta is typically either the alt key or the logo (Windows) key.

In short, C-a M-1 is telling you to press and hold Control and press A; then release both; then press and hold Alt (or Windows) and press 1. The release them, of course.

3
  • Thanks for the answer. This led down the path of remapping my left option key to act as +Esc in iterm2, which accomplishes the various tmux commands that Meta is meant for.
    – Danny
    Nov 10 '14 at 22:15
  • 1
    Most terminal emulators make two Meta bindings. First, they will bind Alt to Meta, allowing Alt-3 to be parsed as M-3. They will generally also make Esc followed by any key act as though you had pressed a Meta key combination.
    – DopeGhoti
    Nov 10 '14 at 23:27
  • 1
    I'm now trying tmux on Windows Subsystem for Linux (wsl) and 'meta key' isn't a well known term in the Windows world. All the key binding guides I was reading were assuming I'd know what M-1 meant. Thanks! Apr 27 '17 at 3:00
8

Years later, I came across this keyboard in a vintage computing museum

Notice the Meta key to the left and right of the keyboard! Along with a host of other useful keys. I wonder what Rub Out does...

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.