Version 0 of Aqua keysyms

Updated 2005-07-29 08:52:40

Mac keyboards have keys labelled "control", "alt", and "⌘" (that last one looks, as it leaves my keyboard, like a four-leaf clover, is represented by U+2318, and is often called the command key or the apple key) both to the left and right of the spacebar.

The following script displays the Tk representation of these keys

label .l pack .l bind . <KeyPress> {.l configure -text %K}

For each key in turn, the label says:

  • control == Control_L
  • alt == Meta_L
  • ⌘ == Alt_L

Yes, really. Where it gets utterly confusing, however, is when the keys are used (as they almost always are) as modifiers.

label .m pack .m bind . <Command-g> {.m configure -text "command g"} bind . <Option-g> {.m configure -text "alt g"} bind . <Control-g> {.m configure -text "control g"}

As a final note, it is useful to know that the bindings are case-sensitive; in other words, <Command-g> and <Command-G> are separate bindings, the latter perhaps more easily being understood as Command and Shift and g together.

-- Alastair Davies 2005/07/25