打开/关闭搜索
搜索
打开/关闭菜单
3.4K
36
42
27.8K
Tardis百科
导航
首页
最近更改
随机页面
特殊页面
上传文件
探索
指南
推理
博客
图像
分类
百科社区
社区中心
论坛
工程
帮助与规则
关于本站
外部
关注我们
敬请期待
交流群
sidebar-icon-qq
sidebar-icon-discord
支持我们
意见反馈
通知
打开/关闭个人菜单
未登录
登录即可进行编辑
user-interface-preferences
个人工具
创建账号
登录
查看“Module:Key”的源代码
出自Tardis百科,中文神秘博士维基
查看
阅读
登录即可编辑
历史
associated-pages
模块
讨论
更多操作
←
Module:Key
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您的IP地址位于在所有wiki上被封禁的地址段中。
执行封禁的管理员是Metawiki>MirahezeGDPR 7d0d9955a879b561967e37f13c9e30c8。 封禁原因是
Web host or open proxy
. Contact
cvt[at]miraheze.org
if affected
.
封禁开始时间:2024年4月14日 (日) 11:52
封禁结束时间:2034年4月14日 (五) 11:52
您可以联络Metawiki>MirahezeGDPR 7d0d9955a879b561967e37f13c9e30c8以讨论此封禁。 您需要在
账号参数设置
中指定一个有效的电子邮件地址且被允许使用该地址后,才能使用“邮件联系”功能。 您当前的IP地址为3.144.102.221。 被封禁的地址段为3.144.0.0/16。 请在咨询时附上以上所有详细信息。
您可以查看和复制此页面的源代码。
-- This module implements {{key press}}. local kbdPrefix = '<kbd class="keyboard-key nowrap">' local kbdSuffix = '</kbd>' local keyText = { ['caps lock'] = '⇪ Caps Lock', ['[[caps lock]]'] = '⇪ [[Caps Lock]]', ['shift'] = '⇧ Shift', ['[[shift key|shift]]'] = '⇧ [[Shift key|Shift]]', ['enter'] = '↵ Enter', ['[[enter key|enter]]'] = '↵ [[Enter key|Enter]]', ['cmd'] = '⌘ Cmd', ['[[command key|cmd]]'] = '⌘ [[Command key|Cmd]]', ['command'] = '⌘ Command', ['[[command key|command]]'] = '⌘ [[Command key|Command]]', ['opt'] = '⌥ Opt', ['[[option key|opt]]'] = '⌥ [[Option key|Opt]]', ['option'] = '⌥ Option', ['[[option key|option]]'] = '⌥ [[Option key|Option]]', ['tab'] = 'Tab ↹', ['[[tab key|tab]]'] = '[[Tab key|Tab]] ↹', ['backspace'] = '← Backspace', ['[[backspace]]'] = '← [[Backspace]]', ['win'] = '⊞ Win', ['[[windows key|win]]'] = '⊞ [[Windows key|Win]]', ['menu'] = '≣ Menu', ['[[menu key|menu]]'] = '≣ [[Menu key|Menu]]', ['up'] = '↑', ['[[arrow keys|up]]'] = '[[Arrow keys|↑]]', ['down'] = '↓', ['[[arrow keys|down]]'] = '[[Arrow keys|↓]]', ['left'] = '←', ['[[arrow keys|left]]'] = '[[Arrow keys|←]]', ['right'] = '→', ['[[arrow keys|right]]'] = '[[Arrow keys|→]]', ['asterisk'] = '*', ['hash'] = '#', ['[[#]]'] = '[[Number sign|#]]', ['colon'] = ':', ['[[:]]'] = '[[Colon (punctuation)|:]]', ['pipe'] = '|', ['[[|]]'] = '[[Pipe symbol||]]', ['semicolon'] = ';', ['[[;]]'] = '[[Semi-colon|;]]', ['equals'] = '=', -- Left & right analog sticks. ['l up'] = 'L↑', ['l down'] = 'L↓', ['l left'] = 'L←', ['l right'] = 'L→', ['l ne'] = 'L↗', ['l se'] = 'L↘', ['l nw'] = 'L↖', ['l sw'] = 'L↙', ['r up'] = 'R↑', ['r down'] = 'R↓', ['r left'] = 'R←', ['r right'] = 'R→', ['r ne'] = 'R↗', ['r se'] = 'R↘', ['r nw'] = 'R↖', ['r sw'] = 'R↙', -- PlayStation. ['ex'] = '×', ['circle'] = '○', ['square'] = '□', ['triangle'] = '△', -- Nintendo 64 and GameCube. ['c up'] = 'C↑', ['c down'] = 'C↓', ['c left'] = 'C←', ['c right'] = 'C→', ['c ne'] = 'C↗', ['c se'] = 'C↘', ['c nw'] = 'C↖', ['c sw'] = 'C↙', } local keyAlias = { -- ['alternate name for key (alias)'] = 'name for key used in key table' ['[[cmd key|cmd]]'] = '[[command key|cmd]]', ['[[cmd key|command]]'] = '[[command key|command]]', ['[[opt key|opt]]'] = '[[option key|opt]]', ['[[option key]]'] = '[[option key|option]]', ['[[opt key|option]]'] = '[[option key|option]]', ['[[win key|win]]'] = '[[windows key|win]]', ['*'] = 'asterisk', ['#'] = 'hash', [':'] = 'colon', [';'] = 'semicolon', ['l-up'] = 'l up', ['l-down'] = 'l down', ['l-left'] = 'l left', ['l-right'] = 'l right', ['l-ne'] = 'l ne', ['l-se'] = 'l se', ['l-nw'] = 'l nw', ['l-sw'] = 'l sw', ['r-up'] = 'r up', ['r-down'] = 'r down', ['r-left'] = 'r left', ['r-right'] = 'r right', ['r-ne'] = 'r ne', ['r-se'] = 'r se', ['r-nw'] = 'r nw', ['r-sw'] = 'r sw', ['ps x'] = 'ex', ['ps c'] = 'circle', ['ps s'] = 'square', ['ps t'] = 'triangle', ['c-up'] = 'c up', ['c-down'] = 'c down', ['c-left'] = 'c left', ['c-right'] = 'c right', ['c-ne'] = 'c ne', ['c-se'] = 'c se', ['c-nw'] = 'c nw', ['c-sw'] = 'c sw', } local Collection = {} Collection.__index = Collection do function Collection:add(item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end function Collection:join(sep) return table.concat(self, sep) end function Collection:sort(comp) table.sort(self, comp) end function Collection.new() return setmetatable({n = 0}, Collection) end end local function keyPress(args) local chainNames = { 'chain first', 'chain second', 'chain third', 'chain fourth', 'chain fifth', 'chain sixth', 'chain seventh', 'chain eighth', 'chain ninth', } local result = Collection.new() local chainDefault = args.chain or '+' for i, id in ipairs(args) do if i > 1 then result:add(args[chainNames[i - 1]] or chainDefault) end local lc = id:lower() local text = keyText[lc] or keyText[keyAlias[lc]] local leftRight = lc:match("^left ") or lc:match("^right ") if not text and leftRight then local _lc = lc:gsub("^" .. leftRight, "") local suffix = keyText[_lc] or keyText[keyAlias[_lc]] if suffix then text = leftRight:gsub("^%l", string.upper) .. " " .. suffix end end result:add(kbdPrefix .. (text or id) .. kbdSuffix) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Key/styles.css'} } .. result:join() end local function keypress(frame) -- Called by "{{key press|...}}". -- Using the template doubles the post‐expand include size. return keyPress(frame:getParent().args) end local function press(frame) -- Called by "{{#invoke:key|press|...}}". return keyPress(frame.args) end return { keypress = keypress, press = press, }
本页使用的模板:
Module:Key/doc
(
查看源代码
)
返回
Module:Key
。
我们提供服务需要使用Cookie。您使用我们的服务,即表示您同意我们使用Cookie。
更多信息
确定