-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of key commands #7
Comments
My reasoning to not follow Apple's order was that because we're not listing the key commands using symbols, we should list them in a different order based on how users would read them from left to right. Apple does the same thing at http://support.apple.com/kb/ht1343, where their order is the reverse of That's my reasoning, but I definitely have no idea what I'm doing here and this is definitely open for debate. |
You do have a point here. But when in doubt, I think, the actual implementation dominates its documentation. I would prefer a visually more appealing style, like showing the keys. I experimented with transforming the command directive into its idioms, but the result is really fugly (it's just too small): Then I remebered that StackOverflow does a similar thing. They use the kbd {
padding: 0.1em 0.6em;
border: 1px solid #ccc;
font-size: 11px;
font-family: Arial,Helvetica,sans-serif;
background-color: #f7f7f7;
color: #333;
-moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
border-radius: 3px;
display: inline-block;
margin: 0 0.1em;
text-shadow: 0 1px 0 #fff;
line-height: 1.4;
white-space: nowrap;
} I think we can combine the best of both worlds. Writing <span title="Command + Option + X">
<kbd>⌥</kbd>
<kbd>⌘</kbd>
<kbd>X</kbd>
</span> so hovering over the shortcut will reveal its textual representation. It has the advantage that the shortcut will not take so much space while displaying / printing it. Even more than one shortcut, separated by commas can be transformed. |
That's a great idea! I'll try to implement that today, although I think it's beyond my Ruby skills. One problem I can think of is that 'command' entries are also used for non-keyboard shortcut stuff (e.g. see RegEx cheatsheet). I think I'll have to introduce a separate 'shortcut' entry. |
At the risk of turning this into something huge, there are other keys that would be handy to include in cheat sheets, as per: http://www.danrodney.com/mac/index.html (under Menu Symbols) |
As @jk pointed out at b3db6f1#commitcomment-5570430, the Apple order for modifier keys is ⌃⌥⇧⌘X. Cheat sheets should follow the same order.
The text was updated successfully, but these errors were encountered: