diff options
| author | Tomáš Znamenáček | 2015-01-28 10:16:15 +0100 |
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-28 10:16:15 +0100 |
| commit | 097288236819dd5ded2e9479fc1bce9509e30047 (patch) | |
| tree | 3cce63309c87015a2b7dd53df6ddd17b82c67729 | |
| parent | 72598e01af7ca932597206e95d03ce043f4bc783 (diff) | |
| download | MASShortcut-097288236819dd5ded2e9479fc1bce9509e30047.tar.bz2 | |
Clarified the spec part about rendering shortcuts.
| -rw-r--r-- | Spec.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -18,8 +18,8 @@ Please stay high-level when writing the spec, do not document particular classes On different keyboard layouts (such as US and Czech), a single shortcut (a combination of physical keys) can have different “names”. -For example, the default system shortcut for toggling directly to Space #2 is Control–2. But when you switch to the Czech keyboard layout, the physical key with the `2` label now inserts the `ě` character. Thus, on most keyboard layouts the shortcut for toggling to Space #2 is `^2`, but on the Czech layout it’s `^ě`. (I stress that this is the same combination of hardware keys.) +For example, the default system shortcut for toggling directly to Space #2 is Control–2. But when you switch to the Czech keyboard layout, the physical key with the `2` label now inserts the `ě` character. Thus, on most keyboard layouts the shortcut for toggling to Space #2 is called `^2`, but on the Czech layout it’s called `^ě`. (I stress that this is the same combination of hardware keys and the same `MASShortcut` instance.) This is reflected by the system: When you open the System Preferences → Keyboard → Shortcuts pane, the shortcuts displayed depend on the currently selected keyboard layout (try switching between the US and Czech keyboard layouts and reopening the preference pane). -This means that the “identity” of a shortcut is given by its key code and modifiers (such as `kVK_ANSI_2` and `NSControlKeyMask`), not the `keyCodeString` returned by the `MASShortcut` class. This string may change depending on the current keyboard layout: `^2` with the US keyboard active, but `^ě` with the Czech keyboard active.
\ No newline at end of file +This means that the “identity” of a shortcut is given by its key code and modifiers (such as `kVK_ANSI_2` and `NSControlKeyMask`), not the `keyCodeString` returned by the `MASShortcut` class. This string may change depending on the current keyboard layout: `^2` with the US keyboard active, but `^ě` with the Czech keyboard active. |
