跳转到内容

模板:Key top

维基教科书,自由的教学读本

{{{1}}}

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

使用

[编辑]

This template renders a key top as found on typewriters and computer keyboards including a standardized or common symbol if available, e.g. from ISO/IEC 9995-7 Keys for which there is an associated Wikipedia article are rendered with a hyperlink. Unlike {{key press}}, this template is not intended to be used for combinations of multiple keys, i.e. “keyboard shortcuts”. It shall be used in descriptions of the physical keys and their functions.

The first, mandatory parameter holds the “natural” key name which is used to select a symbol and link. Its contents is usually also output unchanged next to the symbol unless the second parameter is set to an explicit label, which most often will be blank to suppress the label. The third, also optional parameter, is a binary switch that toggles alternate representations of a very limited selection of symbols: vs. , vs. vs. , vs. , vs. and vs. 🔴.

例子

[编辑]
{{key top|return}}↩ return
{{key top|Return}}↩ Return
{{key top|RETURN}}↩ RETURN
{{key top|Return|}}
{{key top|Enter}}⌅ Enter
{{key top|Return|Enter}}↩ Enter
{{key top|Return||}}
{{key top|Return||true}}
{{key top|Return||narrow}}
{{key top|Return||hollow}}
{{key top|Return||thin}}
{{key top|Return||thick}}
{{key top|Return|Return|narrow}}↵ Return
{{key top|Ctrl}}⌃ Ctrl
{{key top|Ctrl|3=true}}⎈ Ctrl
{{key top|Alt}}⎇ Alt
{{key top|Option}}⌥ Option
{{key top|Option|Alt}}⌥ Alt
{{key top|Windows}}⌘ Windows
{{key top|Command}}⌘ Command
{{key top|Meta}}◆ Meta
{{key top|Super}}❖ Super
{{key top|Windows|3=true}}⊞ Windows
{{key top|Super|Windows}}❖ Windows

模板资料

[编辑]
这是用于新版可视化编辑器及其他工具的模板数据文档。

Key top模板数据

Display symbolic key tops as seen on computer keyboards, phones and typewriters.

模板参数[编辑模板数据]

参数描述类型状态
name1

The standard or common name of the key.

示例值
Shift
单行文本必需
label2

Label for the key if different from the name, leave empty to suppress label.

示例值
Level 2 Select
单行文本可选
alternate symbol3

Switch for certain alternate symbols (return, control, insert, stop, record)

示例值
true
布尔可选

参见

[编辑]
  • {{Key press}} – 产生类似视觉效果,但包含更少的符号,同时直接支持组合(e.g. Ctrl
  • {{Button}} – 产生类似视觉效果,但没有语义标记(e.g. sample text);更多用于表示界面元素。
  • {{Playstation key press}} – 模拟游戏手柄按钮(e.g. {{Playstation key press|s}}
  • {{Kbd}} – to indicate user input (of any kind) without making it look like keys or buttons