Template:Key press:修订间差异

(增加按键颜色)
(加一点选项)
 
第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; color:dimgray;">{{#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|enter|ent|Ent=&#8629;&nbsp;Enter
|Ctrl|ctrl|Control|control=^Ctrl
|控制|CTRL|Ctrl|ctrl|Control|control=^Ctrl
|space|Space=&#9251; Space
|空格|SPACE|space|Space=&#9251; Space
|Home|home=&#127968; Home
|HOME|Home|home=&#127968; Home
|Esc|Escape|esc|escape=&#9099;Esc
|ESC|Esc|Escape|esc|escape=&#9099;Esc
|Tab|tab=&#8646;Tab
|制表|TAB|Tab|tab=&#8646;Tab
|LockMaj|maj|Maj=&#128274;Maj
|LockMaj|maj|Maj=&#128274;Maj
|Shift|shift=&#8679;Shift
|上档|SHIFT|Shift|shift=&#8679;Shift
|Alt|alt=Alt
|换档|ALTER|Alter|ALT|Alt|alt=Alt
|Option|option|Opt|opt=&#8997;Option
|OPTION|Option|option|Opt|opt=&#8997;Option
|Cmd|cmd|Command|command=&#8984;Command
|CMD|Cmd|cmd|Command|command=&#8984;Command
|suppr|Suppr|Delete|delete|del|Del=Delete
|删除|DELETE|suppr|Suppr|Delete|delete|del|Del=Delete
|Backspace|backspace|Back|back=&#8592;Backspace
|退格|BACKSPACE|Backspace|backspace|Back|back=&#8592;Backspace
|1|2|3|4|5|6|7|8|9|0|+|-={{#ifeq:{{{2|}}}|numpad|NumPad {{{1}}}|{{{1}}}}}
|1|2|3|4|5|6|7|8|9|0|+|-={{#ifeq:{{{2|}}}|numpad|NumPad {{{1}}}|{{{1}}}}}
|#default={{{1}}}
|#default={{{1}}}

2020年9月5日 (六) 14:36的最新版本

{{{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