aboutsummaryrefslogtreecommitdiffstats
path: root/Framework
diff options
context:
space:
mode:
authorTomáš Znamenáček2015-01-28 15:32:20 +0100
committerTomáš Znamenáček2015-01-28 15:32:20 +0100
commit38fe428b192dc4d18faeadc8585db7580fb99420 (patch)
treef03c0ada6d61c5b8aa1f7c883ac3cb79d26689dc /Framework
parentde647cf8251faa14239bdbbc8027116f6e5627c6 (diff)
downloadMASShortcut-38fe428b192dc4d18faeadc8585db7580fb99420.tar.bz2
Documented that keyCodeString depends on active keyboard layout.
Diffstat (limited to 'Framework')
-rw-r--r--Framework/MASShortcut.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Framework/MASShortcut.h b/Framework/MASShortcut.h
index e175317..8f420e4 100644
--- a/Framework/MASShortcut.h
+++ b/Framework/MASShortcut.h
@@ -39,6 +39,11 @@
/**
A string representing the “key” part of a shortcut, like the `5` in `⌘5`.
+
+ @warning The value may change depending on the active keyboard layout.
+ For example for the `^2` keyboard shortcut (`kVK_ANSI_2+NSControlKeyMask`
+ to be precise) the `keyCodeString` is `2` on the US keyboard, but `ě` when
+ the Czech keyboard layout is active. See the spec for details.
*/
@property (nonatomic, readonly) NSString *keyCodeString;
@@ -49,6 +54,12 @@
property of `NSMenuItem`. Here the string is used to support shortcut
validation (“is the shortcut already taken in this menu?”) and
for display in `NSMenu`.
+
+ The value of this property may differ from `keyCodeString`. For example
+ the Russian keyboard has a `Г` (Ge) Cyrillic character in place of the
+ latin `U` key. This means you can create a `^Г` shortcut, but in menus
+ that’s always displayed as `^U`. So the `keyCodeString` returns `Г`
+ and `keyCodeStringForKeyEquivalent` returns `U`.
*/
@property (nonatomic, readonly) NSString *keyCodeStringForKeyEquivalent;