45

In window managers' circles, there are some technical terms; a couple of them are "Mod keys" and "Meta keys." The questions I am asking are:

  • What exactly are those, and are they universal across different keyboards?
  • What are the names for the Alt, Shift, Ctrl (both right and left), Win, and right-click keys?

I ask this because I am working on both tiling window managers and stacked ones, and there are lots of references to this issue.

1
  • For future travelers wanting more direct answers, see askubuntu.com/questions/19558/… for very complete answer with pictures. Super is the Windows key. Rest are not on 101 keyboards. Alt, shift and control are called alt, shift and control, left and right. Unix x11 keys are super specific with 'keysyms', so they are not overlapping for these keys generally across different platforms.
    – Beeeaaar
    May 1, 2019 at 22:15

1 Answer 1

69

Keypresses in X have 8 modifier bits:

  • Shift
  • Lock
  • Control
  • Mod1
  • Mod2
  • Mod3
  • Mod4
  • Mod5

Any key can be bound to any of these modifiers, but (as you might imagine) typically the left/right Shift keys are bound to Shift, Caps Lock is bound to Lock, and left/right Ctrl are bound to Control. Conspicuously missing from the list is Alt, which is usually bound to Mod1. Tiling window managers also frequently refer to a single "mod key", which is the modifier key chosen by the user for all the WM's keybindings. For example, if the mod key is Alt, then Alt+J will generally advance to the next window.

Meta, Super, and Hyper are all keys from the old Symbolics keyboard that X still has internal keycodes for (so they can still be bound to modifiers). Super is still around on modern keyboards, as the /Tux/whatever key next to Alt. It's usually bound to Mod4. Meta and Hyper are both gone. Alt is sometimes called "Meta" because it replaced Meta's functionality; I suspect emacs is mostly at fault for using Alt and Esc as replacements for meta in its keybindings. However, some people refer to the key as "Meta" as well, so you should probably just avoid the term altogether.

By right click key you probably mean the Menu key which in many applications and operating systems functions similarly to to a right click on the mouse — it opens a context menu.

8
  • Nice answer; You said in your answer that win key could be replace Alt in being meta key. Could you elaborate?
    – r004
    Mar 11, 2014 at 22:36
  • 1
    @r004 Some people use "Meta" to refer to the Win key, but in most cases if they're talking about a modern keyboard, they mean Alt (if only because Meta is usually bound to mod1) Mar 12, 2014 at 0:03
  • 4
    You talked about Mod1 and Mod4, What about rest of them? Are they empty by default?
    – r004
    Mar 12, 2014 at 1:04
  • 10
    @r004 You can see the current mappings by running xmodmap. I don't know how standard it is, but generally I see Num Lock on mod2 and ISO_Level3_Shift and Mode_Switch on mod5 (explained here). mod3 is empty Mar 12, 2014 at 2:34
  • 1
    @r004 The last big paragraph of my answer explained Meta, Super, and Hyper, and the post I linked to explained ISO_Level3_Shift Mar 12, 2014 at 4:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .