模板:Key top/doc
| 此頁面是Template:Key top的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
| 這是 Key top 模板的說明文件頁面。 本文件並不是為直接瀏覽而撰寫。若是其中使用了跨維基計畫連結,某些連結可能會顯示損毀。請勿將這些連結替換為硬編碼的頁面名稱或網址。 |
使用
[編輯]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|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
模板資料
[編輯]Display symbolic key tops as seen on computer keyboards, phones and typewriters.
| 參數 | 描述 | 類型 | 狀態 | |
|---|---|---|---|---|
| name | 1 | The standard or common name of the key.
| 行 | 必填 |
| label | 2 | Label for the key if different from the name, leave empty to suppress label.
| 行 | 非必填 |
| alternate symbol | 3 | Switch for certain alternate symbols (return, control, insert, stop, record)
| 布林值 | 非必填 |
參見
[編輯]{{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