MASShortcut.m has a switch statement inside -keyCodeStringForKeyEquivalent to translate a virtual key code into a user-facing string.
This method hard-codes a bunch of values, like 0xF704 for F1.
Instead of hard-coding these values, you should use the constants defined in NSEvent.h (down towards the bottom of the file), so 0xF704 would become NSF1FunctionKey, which would make its meaning much clearer.
It would also clarify the issue about guessing the value of higher-order function keys, since NSEvent defines values all the way up to a hypothetical “F35” key.
MASShortcut.m
has a switch statement inside-keyCodeStringForKeyEquivalent
to translate a virtual key code into a user-facing string.This method hard-codes a bunch of values, like
0xF704
for F1.Instead of hard-coding these values, you should use the constants defined in NSEvent.h (down towards the bottom of the file), so
0xF704
would becomeNSF1FunctionKey
, which would make its meaning much clearer.It would also clarify the issue about guessing the value of higher-order function keys, since NSEvent defines values all the way up to a hypothetical “F35” key.