Template:Key press:修订间差异

(创建页面,内容为“<kbd style="border: 1px solid #aaa; border-radius: 2px; box-shadow: 1px 2px 2px #ddd; background-color: #f9f9f9; background-image: linear-gradient(top, #eee, #f9f9f9…”)
 
(增加按键颜色)
第1行: 第1行:
<kbd style="border: 1px solid #aaa; border-radius: 2px; box-shadow: 1px 2px 2px #ddd; background-color: #f9f9f9; background-image: linear-gradient(top, #eee, #f9f9f9, #eee); padding: 1px 3px; font-family: inherit; font-size: 0.85em; white-space: nowrap;">{{#switch:{{{1}}}
<kbd style="border: 1px solid #aaa; border-radius: 2px; box-shadow: 1px 2px 2px #ddd; background-color: #f9f9f9; background-image: linear-gradient(top, #eee, #f9f9f9, #eee); padding: 1px 3px; font-family: inherit; font-size: 0.85em; white-space: nowrap; color:dimgray;">{{#switch:{{{1}}}
|Enter|enter|ent|Ent=&#8629;&nbsp;Enter
|Enter|enter|ent|Ent=&#8629;&nbsp;Enter
|Ctrl|ctrl|Control|control=^Ctrl
|Ctrl|ctrl|Control|control=^Ctrl
第16行: 第16行:
|#default={{{1}}}
|#default={{{1}}}
}}</kbd><noinclude>
}}</kbd><noinclude>
 
{{template doc}}
Used for keyboard shortcuts.
[[Category: 模板]]
 
<u>Example:</u>
<pre>{{key press|A}}</pre>
{{key press|A}}
 
== Held modifier keys ==
 
{| class ="wikitable"
! Modifier !! Usage !! Render !! Notes
|-
| Ctrl || <tt>Ctrl</tt>, <tt>ctrl</tt>, <tt>Control</tt>, <tt>control</tt> || {{key press|ctrl}} ||
|-
| Command || <tt>Cmd</tt>, <tt>cmd</tt>, <tt>Command</tt>, <tt>command</tt> || {{key press|cmd}} ||
|-
| Shift || <tt>Shift</tt>, <tt>shift</tt> || {{key press|Shift}} ||
|-
| Alt || <tt>Alt</tt>, <tt>alt</tt> || {{key press|Alt}} ||
|-
| Option || <tt>Option</tt>, <tt>option</tt>, <tt>Opt</tt>, <tt>opt</tt> || {{key press|Option}} || OS X equivalent of {{key press|Alt}}
|}
 
== Special keys ==
 
{| class ="wikitable"
! Key press !! Usage !! Render !! Notes
|-
| Enter || <tt>Enter</tt>, <tt>enter</tt>, <tt>Ent</tt>, <tt>ent</tt> || {{key press|ent}} ||
|-
| Space Bar || <tt>Space</tt>, <tt>space</tt> || {{key press|space}} ||
|-
| Home || <tt>home</tt>, <tt>Home</tt> || {{key press|home}} || Does not always render correctly, depending on the browser and installed fonts
|-
| Escape || <tt>Esc</tt>, <tt>esc</tt>, <tt>Escape</tt>, <tt>escape</tt> || {{key press|esc}} ||
|-
| Tab || <tt>tab</tt>, <tt>Tab</tt> || {{key press|tab}} ||
|-
| Delete || <tt>del</tt>, <tt>Del</tt>, <tt>suppr</tt>, <tt>Suppr</tt>, <tt>delete</tt>, <tt>Delete</tt> || {{key press|del}} || Mac users may find this confusing
|-
| Backspace || <tt>Backspace</tt>, <tt>backspace</tt>, <tt>Back</tt>, <tt>back</tt> || {{key press|back}} || Mac users will probably understand this to be the key labeled "delete"
|}
 
== Special instructions ==
 
{| class ="wikitable"
! Special instruction !! Usage !! Render !! Notes
|-
| Maj || <tt>LockMaj</tt>, <tt>Maj</tt>, <tt>maj</tt> || {{key press|maj}} || Does not always render correctly, depending on the browser and installed fonts
|-
| Numpad || <tt><nowiki>{{key press|1|numpad}}</nowiki></tt> || {{key press|1|numpad}} || Note special syntax for the second parameter
|}
 
[[Category:Templates]]
</noinclude>
</noinclude>

2020年9月5日 (六) 14:29的版本

{{{1}}}

[阅读] [编辑]Template-info.png 模板文档

Used for keyboard shortcuts.

Example:

{{key press|A}}

A

Held modifier keys

Modifier Usage Render Notes
Ctrl Ctrl, ctrl, Control, control ^Ctrl
Command Cmd, cmd, Command, command ⌘Command
Shift Shift, shift ⇧Shift
Alt Alt, alt Alt
Option Option, option, Opt, opt ⌥Option OS X equivalent of Alt

Special keys

Key press Usage Render Notes
Enter Enter, enter, Ent, ent ↵ Enter
Space Bar Space, space ␣ Space
Home home, Home 🏠 Home Does not always render correctly, depending on the browser and installed fonts
Escape Esc, esc, Escape, escape ⎋Esc
Tab tab, Tab ⇆Tab
Delete del, Del, suppr, Suppr, delete, Delete Delete Mac users may find this confusing
Backspace Backspace, backspace, Back, back ←Backspace Mac users will probably understand this to be the key labeled "delete"

Special instructions

Special instruction Usage Render Notes
Maj LockMaj, Maj, maj 🔒Maj Does not always render correctly, depending on the browser and installed fonts
Numpad {{key press|1|numpad}} NumPad 1 Note special syntax for the second parameter