diff --git a/README.md b/README.md index ff67529..2574d0f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A zero-dependency web component to display and emulate keyboard layouts. -![screenshot](screenshot.png) +![screenshot](keyboard.svg) [Online demo here.](https://fabi1cazenave.github.io/x-keyboard/) diff --git a/keyboard.svg b/keyboard.svg new file mode 100644 index 0000000..4b25798 --- /dev/null +++ b/keyboard.svg @@ -0,0 +1,1001 @@ + + + + + + + + + + + + + + + 半角 + 全角 + 漢字 + + ` + ~ + + + + + + + + + + 1 + ! + + + + + + + + + + 2 + @ + + + + + + + + + + 3 + # + + + + + + + + + + 4 + + + + + + + + + + + 5 + % + + + + + + + + + + + + 6 + ^ + + + + + + + + + + 7 + & + + + + + + + + + + 8 + * + + + + + + + + + + 9 + « + + + + + + + + + + 0 + » + + + + + + + + + + - + _ + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Q + @ + + + + + + + + + + W + < + + + + + + + + + + E + > + + + + + + + + + + R + $ + + + + + + + + + + T + % + + + + + + + + + + + + Y + ^ + ̂ + + + + + + + + + U + & + µ + + + + + + + + + I + * + × + + + + + + + + + O + ' + ́ + + + + + + + + + P + ` + ̀ + + + + + + + + [ + { + + + + + + + + + + + ] + } + + + + + + + + + + + \ + | + + + + + + + + + + + + + + + 英数 + + + + + + A + { + + + + + + + + + + S + ( + + + + + + + + + + D + ) + + + + + + + + + + F + } + + + + + + + + + + G + = + + + + + + + + + + + + H + \ + + + + + + + + + + J + + + ± + + + + + + + + + K + - + ¬ + + + + + + + + + L + / + ÷ + + + + + + + + + + " + ̈ + + + + + + + + ' + " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + < + > + + + + + + + + + + + Z + ~ + ̃ + + + + + + + + + X + [ + + + + + + + + + + C + ] + + + + + + + + + + V + _ + + + + + + + + + + B + # + + + + + + + + + + + + N + | + ¦ + + + + + + + + + M + ! + + + + + + + + + , + ; + ; + ̧ + + + + + + + + . + : + : + + + + + + + + + / + ? + ? + + + + + + + + + + + + + + + + + + + + + + + + + + + Ctrl + + + + + + Win + Super + + + + + + Alt + + + + + 한자 + + + + 無変換 + + + + + + + + + + + + + 変換 + + + + カタカナ + ひらがな + ローマ字 + + + + 한/영 + + + + + Alt + + + + + + Win + Super + + + + + + + + + + + + Ctrl + + + + + diff --git a/screenshot.png b/screenshot.png deleted file mode 100644 index 0416a6a..0000000 Binary files a/screenshot.png and /dev/null differ diff --git a/src/content.js b/src/content.js index f623498..2984c32 100644 --- a/src/content.js +++ b/src/content.js @@ -78,7 +78,6 @@ const text = (content, cname = '', attributes) => sgml('text', { height: 0.50, x: 0.34, y: 0.78, - 'text-anchor': 'middle', ...attributes, }, [content]); @@ -95,7 +94,7 @@ const gKey = (className, finger, x, id, children = emptyKey) => sgml('g', { */ const keyLevel = (level, label, position) => { - const attrs = { 'text-anchor': 'middle', ...position }; + const attrs = { ...position }; const symbol = dkSymbols[label] || ''; const content = symbol || (label || '').slice(-1); let className = ''; @@ -382,10 +381,10 @@ const baseRow = g('left', [ export const svgContent = ` - ${numberRow} - ${letterRow1} - ${letterRow2} - ${letterRow3} - ${baseRow} + ${numberRow} + ${letterRow1} + ${letterRow2} + ${letterRow3} + ${baseRow} `;