Difference between revisions of "Template:Key press"
Jump to navigation
Jump to search
Debug data:
(Uses sans-serif fonts for keys now (to see if it looks better than proportional).) |
m |
||
Line 3: | Line 3: | ||
==Usage== | ==Usage== | ||
<code><nowiki>{{</nowiki>Key press<nowiki>|key|border style}}</nowiki></code> | <code><nowiki>{{</nowiki>Key press<nowiki>|key|border style}}</nowiki></code> | ||
− | * | + | * <var>key</var> is the literal name of the key to be pressed. For ''F4'', for example, the syntax is <code><nowiki>{{</nowiki>Key press<nowiki>|F4}}</nowiki></code>. This results in the following: {{Key press|F4}} |
* HTML character entities are allowed. For example, to display the multiplication symbol, this works: <code><nowiki>{{</nowiki>Key press|'''<nowiki>&times;</nowiki>'''<nowiki>}}</nowiki></code> and results in {{Key press|×}}. | * HTML character entities are allowed. For example, to display the multiplication symbol, this works: <code><nowiki>{{</nowiki>Key press|'''<nowiki>&times;</nowiki>'''<nowiki>}}</nowiki></code> and results in {{Key press|×}}. | ||
− | * To display a pressed key, add | + | * To display a pressed key, add <code>inset</code> border style like this: <code><nowiki>{{</nowiki>Key press<nowiki>|F4|inset}}</nowiki></code> and the key will appear to be pressed: {{Key press|F4|inset}}. |
− | * The | + | * The <var>key</var> and <var>border</var> parameters can be reversed, but then their names need to be specified: <code><nowiki>{{</nowiki>Key press<nowiki>|border=inset|key=F4}}</nowiki></code> will become {{Key press|border=inset|key=F4}} |
* Forgetting to specify a key will default to the equals sign: <code><nowiki>{{</nowiki>Key press<nowiki>}}</nowiki></code> becomes {{Key press }}. | * Forgetting to specify a key will default to the equals sign: <code><nowiki>{{</nowiki>Key press<nowiki>}}</nowiki></code> becomes {{Key press }}. | ||
</noinclude> | </noinclude> |
Revision as of 17:09, 13 June 2020
A simple template that makes it easier to see that a keyboard key is involved.
Usage
{{Key press|key|border style}}
- key is the literal name of the key to be pressed. For F4, for example, the syntax is
{{Key press|F4}}
. This results in the following: F4 - HTML character entities are allowed. For example, to display the multiplication symbol, this works:
{{Key press|×}}
and results in ×. - To display a pressed key, add
inset
border style like this:{{Key press|F4|inset}}
and the key will appear to be pressed: F4. - The key and border parameters can be reversed, but then their names need to be specified:
{{Key press|border=inset|key=F4}}
will become F4 - Forgetting to specify a key will default to the equals sign:
{{Key press}}
becomes =.
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 3.17.74.181
Start request GET /mediawiki/index.php?diff=prev&oldid=6681&title=Template%3AKey_press
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
COOKIE: wikidb229_mw__session=voauu4psb49h6vpbc255kahhfj5rd47u
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[session] Session "voauu4psb49h6vpbc255kahhfj5rd47u" requested without UserID cookie
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "3.17.74.181",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Template:Key press]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
Article::view: showing diff page
DifferenceEngine old '6681' new 'prev' rcid ''
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
DifferenceEngine old '0' new '0' rcid '0'
WikiPage::getParserOutput: using parser cache: no
[caches] parser: SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
Parser cache options found.
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:545bd9c5a43671b11c60f34d10e6bf5c:0)
[Parser] Parser::setOutputFlag: set vary-revision-sha1 flag on 'Template:Key press'; Self transclusion
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:545bd9c5a43671b11c60f34d10e6bf5c:1)
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:545bd9c5a43671b11c60f34d10e6bf5c:0)
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to [[Template:Key press]] are {edit,move}