新下駄配列のマップ

新下駄配列の見やすいマップがなかったので作りました。見ればわかると思いますが、いちおう説明しておきます。一番上の段はシフトキーを押したときに出る文字。真ん中は左から、iと共に押したとき、普段出る文字、oと共に押したときです。下段は左からkかsと共に押したとき、そのまま押したとき、lかdと共に押したときです。

RubyでSVGを出力するプログラムで書きました。なので、だいぶ冗長な感じになっています。Rubyプログラムも動けばいいやつなのでだいぶ雑です。このあとErgoDox EZの別レイヤーのキーも載せるつもりなので途中なのです。まあ、そのときでも汚いままな気もしますが。

<svg xmlns="http://www.w3.org/2000/svg"     xmlns:xlink="http://www.w3.org/1999/xlink"     width="1200" height="700"><rect x="10" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="30" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="63" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">!</text>
<text x="97" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="30" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ゅ</text>
<text x="63" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">1</text>
<text x="97" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ょ</text>
<text x="30" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぁ</text>
<text x="63" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">1</text>
<text x="97" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ゃ</text>
<rect x="127" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="147" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="180" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">@</text>
<text x="214" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="147" y="66" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">びゃ</text>
<text x="180" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">2</text>
<text x="214" y="66" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ぴゃ</text>
<text x="147" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぃ</text>
<text x="180" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">2</text>
<text x="214" y="99" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">みゃ</text>
<rect x="244" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="264" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="297" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">#</text>
<text x="331" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="264" y="66" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">びゅ</text>
<text x="297" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">3</text>
<text x="331" y="66" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ぴゅ</text>
<text x="264" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぅ</text>
<text x="297" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">3</text>
<text x="331" y="99" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">みゅ</text>
<rect x="361" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="381" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="414" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">$</text>
<text x="448" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="381" y="66" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">びょ</text>
<text x="414" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">4</text>
<text x="448" y="66" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ぴょ</text>
<text x="381" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぇ</text>
<text x="414" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">4</text>
<text x="448" y="99" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">みょ</text>
<rect x="478" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="498" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="531" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">%</text>
<text x="565" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="498" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="531" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">5</text>
<text x="565" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="498" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぉ</text>
<text x="531" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">5</text>
<text x="565" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ゎ</text>
<rect x="615" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="635" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">^</text>
<text x="702" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">6</text>
<text x="702" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">6</text>
<text x="702" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<rect x="732" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="752" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">&amp;</text>
<text x="819" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">7</text>
<text x="819" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">.</text>
<text x="785" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">7</text>
<text x="819" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">,</text>
<rect x="849" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="869" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">*</text>
<text x="936" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">8</text>
<text x="936" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">(</text>
<text x="902" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">8</text>
<text x="936" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">「</text>
<rect x="966" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="986" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">(</text>
<text x="1053" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">9</text>
<text x="1053" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">)</text>
<text x="1019" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">9</text>
<text x="1053" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">」</text>
<rect x="1083" y="10" width="107" height="107" fill="white" stroke="black" />
<text x="1103" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">)</text>
<text x="1170" y="33" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">0</text>
<text x="1170" y="66" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">:</text>
<text x="1136" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">0</text>
<text x="1170" y="99" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">;</text>
<rect x="10" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="30" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="63" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">Q</text>
<text x="97" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="30" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ひゅ</text>
<text x="63" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">q</text>
<text x="97" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">りゅ</text>
<text x="30" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ふぁ</text>
<text x="63" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ー</text>
<text x="97" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぢ</text>
<rect x="127" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="147" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="180" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">W</text>
<text x="214" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="147" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">しゅ</text>
<text x="180" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">w</text>
<text x="214" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">じゅ</text>
<text x="147" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ご</text>
<text x="180" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">に</text>
<text x="214" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">め</text>
<rect x="244" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="264" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="297" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">E</text>
<text x="331" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="264" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">しょ</text>
<text x="297" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">e</text>
<text x="331" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">じょ</text>
<text x="264" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ふ</text>
<text x="297" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">は</text>
<text x="331" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">け</text>
<rect x="361" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="381" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="414" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">R</text>
<text x="448" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="381" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">きゅ</text>
<text x="414" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">r</text>
<text x="448" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ぎゅ</text>
<text x="381" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ふぃ</text>
<text x="414" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">、</text>
<text x="448" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">てぃ</text>
<rect x="478" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="498" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="531" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">T</text>
<text x="565" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="498" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ちゅ</text>
<text x="531" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">t</text>
<text x="565" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">にゅ</text>
<text x="498" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ふぇ</text>
<text x="531" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ち</text>
<text x="565" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">でぃ</text>
<rect x="615" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="635" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">Y</text>
<text x="702" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">y</text>
<text x="702" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">しぇ</text>
<text x="668" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぐ</text>
<text x="702" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">うぃ</text>
<rect x="732" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="752" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">U</text>
<text x="819" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">u</text>
<text x="819" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぺ</text>
<text x="785" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ば</text>
<text x="819" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぱ</text>
<rect x="849" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="869" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">I</text>
<text x="936" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">i</text>
<text x="936" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ど</text>
<text x="902" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">こ</text>
<text x="936" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">よ</text>
<rect x="966" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="986" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">O</text>
<text x="1053" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">o</text>
<text x="1053" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">や</text>
<text x="1019" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">が</text>
<text x="1053" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">み</text>
<rect x="1083" y="127" width="107" height="107" fill="white" stroke="black" />
<text x="1103" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">P</text>
<text x="1170" y="150" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="183" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">うぉ</text>
<text x="1136" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">p</text>
<text x="1170" y="183" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">げ</text>
<text x="1103" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">じぇ</text>
<text x="1136" y="216" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ひ</text>
<text x="1170" y="216" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">うぇ</text>
<rect x="10" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="30" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="63" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">A</text>
<text x="97" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="30" y="300" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ひょ</text>
<text x="63" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">a</text>
<text x="97" y="300" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">りょ</text>
<text x="30" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ほ</text>
<text x="63" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">の</text>
<text x="97" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">を</text>
<rect x="127" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="147" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="180" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">S</text>
<text x="214" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="147" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="180" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">s</text>
<text x="214" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="147" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">じ</text>
<text x="180" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">と</text>
<text x="214" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">さ</text>
<rect x="244" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="264" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="297" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">D</text>
<text x="331" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="264" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="297" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">d</text>
<text x="331" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="264" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">れ</text>
<text x="297" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">か</text>
<text x="331" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">お</text>
<rect x="361" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="381" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="414" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">F</text>
<text x="448" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="381" y="300" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">きょ</text>
<text x="414" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">f</text>
<text x="448" y="300" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ぎょ</text>
<text x="381" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">も</text>
<text x="414" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ん</text>
<text x="448" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">り</text>
<rect x="478" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="498" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="531" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">G</text>
<text x="565" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="498" y="300" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ちょ</text>
<text x="531" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">g</text>
<text x="565" y="300" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">にょ</text>
<text x="498" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ゆ</text>
<text x="531" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">っ</text>
<text x="565" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ず</text>
<rect x="615" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="635" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">H</text>
<text x="702" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">h</text>
<text x="702" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">び</text>
<text x="668" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">く</text>
<text x="702" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">へ</text>
<rect x="732" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="752" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">J</text>
<text x="819" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">j</text>
<text x="819" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ら</text>
<text x="785" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">う</text>
<text x="819" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">あ</text>
<rect x="849" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="869" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">K</text>
<text x="936" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">k</text>
<text x="936" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">い</text>
<text x="936" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<rect x="966" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="986" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">L</text>
<text x="1053" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">l</text>
<text x="1053" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">し</text>
<text x="1053" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<rect x="1083" y="244" width="107" height="107" fill="white" stroke="black" />
<text x="1103" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">:</text>
<text x="1170" y="267" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">;</text>
<text x="1170" y="300" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">そ</text>
<text x="1136" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">な</text>
<text x="1170" y="333" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">え</text>
<rect x="10" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="30" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="63" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">Z</text>
<text x="97" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="30" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ひゃ</text>
<text x="63" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">z</text>
<text x="97" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">りゃ</text>
<text x="30" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">づ</text>
<text x="63" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">す</text>
<text x="97" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぜ</text>
<rect x="127" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="147" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="180" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">X</text>
<text x="214" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="147" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="180" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">x</text>
<text x="214" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="147" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぞ</text>
<text x="180" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ま</text>
<text x="214" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ざ</text>
<rect x="244" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="264" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="297" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">C</text>
<text x="331" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="264" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">しゃ</text>
<text x="297" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">c</text>
<text x="331" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">じゃ</text>
<text x="264" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぼ</text>
<text x="297" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">き</text>
<text x="331" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぎ</text>
<rect x="361" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="381" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="414" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">V</text>
<text x="448" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="381" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">きゃ</text>
<text x="414" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">v</text>
<text x="448" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ぎゃ</text>
<text x="381" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">む</text>
<text x="414" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">る</text>
<text x="448" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ろ</text>
<rect x="478" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="498" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="531" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">B</text>
<text x="565" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="498" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ちゃ</text>
<text x="531" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">b</text>
<text x="565" y="417" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">にゃ</text>
<text x="498" y="450" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ふぉ</text>
<text x="531" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">つ</text>
<text x="565" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぬ</text>
<rect x="615" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="635" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">N</text>
<text x="702" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="668" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">n</text>
<text x="702" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="635" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">わ</text>
<text x="668" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">て</text>
<text x="702" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">せ</text>
<rect x="732" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="752" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">M</text>
<text x="819" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="785" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">m</text>
<text x="819" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="752" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">だ</text>
<text x="785" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">た</text>
<text x="819" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ね</text>
<rect x="849" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="869" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">&lt;</text>
<text x="936" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="902" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">,</text>
<text x="936" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="869" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぴ</text>
<text x="902" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">で</text>
<text x="936" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">べ</text>
<rect x="966" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="986" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">&gt;</text>
<text x="1053" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1019" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">.</text>
<text x="1053" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="986" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぽ</text>
<text x="1019" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">。</text>
<text x="1053" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぷ</text>
<rect x="1083" y="361" width="107" height="107" fill="white" stroke="black" />
<text x="1103" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">?</text>
<text x="1170" y="384" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1136" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">/</text>
<text x="1170" y="417" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central"></text>
<text x="1103" y="450" text-anchor="middle" font-size="16.666666666666668" letter-spacing="-2" dominant-baseline="central">ちぇ</text>
<text x="1136" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ぶ</text>
<text x="1170" y="450" text-anchor="middle" font-size="25" letter-spacing="-2" dominant-baseline="central">ゔ</text>
</svg>
require './svg-wrapper'

$keymap = [['', '!', '', 'ゅ', '1', 'ょ', 'ぁ', '1', 'ゃ'],
           ['', '@', '', 'びゃ', '2', 'ぴゃ', 'ぃ', '2', 'みゃ'],
           ['', '#', '', 'びゅ', '3', 'ぴゅ', 'ぅ', '3', 'みゅ'],
           ['', '$', '', 'びょ', '4', 'ぴょ', 'ぇ', '4', 'みょ'],
           ['', '%', '', '', '5', '', 'ぉ', '5', 'ゎ'],
           ['', '^', '', '', '6', '', '', '6', ''],
           ['', '&', '', '', '7', '', '.', '7', ','],
           ['', '*', '', '', '8', '', '(', '8', '「'],
           ['', '(', '', '', '9', '', ')', '9', '」'],
           ['', ')', '', '', '0', '', ':', '0', ';'],
           ['', 'Q', '', 'ひゅ', 'q', 'りゅ', 'ふぁ', 'ー', 'ぢ'],
           ['', 'W', '', 'しゅ', 'w', 'じゅ', 'ご', 'に', 'め'],
           ['', 'E', '', 'しょ', 'e', 'じょ', 'ふ', 'は', 'け'],
           ['', 'R', '', 'きゅ', 'r', 'ぎゅ', 'ふぃ', '、', 'てぃ'],
           ['', 'T', '', 'ちゅ', 't', 'にゅ', 'ふぇ', 'ち', 'でぃ'],
           ['', 'Y', '', '', 'y', '', 'しぇ', 'ぐ', 'うぃ'],
           ['', 'U', '', '', 'u', '', 'ぺ', 'ば', 'ぱ'],
           ['', 'I', '', '', 'i', '', 'ど', 'こ', 'よ'],
           ['', 'O', '', '', 'o', '', 'や', 'が', 'み'],
           ['', 'P', '', 'うぉ', 'p', 'げ', 'じぇ', 'ひ', 'うぇ'],
           ['', 'A', '', 'ひょ', 'a', 'りょ', 'ほ', 'の', 'を'],
           ['', 'S', '', '', 's', '', 'じ', 'と', 'さ'],
           ['', 'D', '', '', 'd', '', 'れ', 'か', 'お'],
           ['', 'F', '', 'きょ', 'f', 'ぎょ', 'も', 'ん', 'り'],
           ['', 'G', '', 'ちょ', 'g', 'にょ', 'ゆ', 'っ', 'ず'],
           ['', 'H', '', '', 'h', '', 'び', 'く', 'へ'],
           ['', 'J', '', '', 'j', '', 'ら', 'う', 'あ'],
           ['', 'K', '', '', 'k', '', '', 'い', ''],
           ['', 'L', '', '', 'l', '', '', 'し', ''],
           ['', ':', '', '', ';', '', 'そ', 'な', 'え'],
           ['', 'Z', '', 'ひゃ', 'z', 'りゃ', 'づ', 'す', 'ぜ'],
           ['', 'X', '', '', 'x', '', 'ぞ', 'ま', 'ざ'],
           ['', 'C', '', 'しゃ', 'c', 'じゃ', 'ぼ', 'き', 'ぎ'],
           ['', 'V', '', 'きゃ', 'v', 'ぎゃ', 'む', 'る', 'ろ'],
           ['', 'B', '', 'ちゃ', 'b', 'にゃ', 'ふぉ', 'つ', 'ぬ'],
           ['', 'N', '', '', 'n', '', 'わ', 'て', 'せ'],
           ['', 'M', '', '', 'm', '', 'だ', 'た', 'ね'],
           ['', '<', '', '', ',', '', 'ぴ', 'で', 'べ'],
           ['', '>', '', '', '.', '', 'ぽ', '。', 'ぷ'],
           ['', '?', '', '', '/', '', 'ちぇ', 'ぶ', 'ゔ']]

def main
  svg = SvgWrapper.new
  view_width = 1200
  base_y = 700

  font_size = 25
  font_width = font_size
  padding_x = 8
  width = font_width * 3 + padding_x * 4

  font_height = font_size
  padding_y = 8
  height = font_height * 3 + padding_y * 4

  key_gap_x = 10
  key_gap_y = 10

  y = key_gap_y
  for i in 0..3
    x = key_gap_x
    for j in 0..9
      svg.add_rect(x, y, width, height)
      map_i = i * 10 + j
      for k in 0..2
        letter_y = y + font_height * (k + 1) + padding_y * k -2
        center = x + (width / 2)
        str = $keymap[map_i][k * 3 + 0]
        size = font_width
        if str.length > 1 then size = font_width / 1.5 end
        svg.add_text3(x + padding_x + font_width / 2,
                     letter_y,
                     "middle",
                     size,
                     -2,
                     str)
        str = $keymap[map_i][k * 3 + 1]
        size = font_width
        if str.length > 1 then size = font_width / 1.5 end
        svg.add_text3(center,
                     letter_y,
                     "middle",
                     size,
                     -2,
                     str)
        str = $keymap[map_i][k * 3 + 2]
        size = font_width
        if str.length > 1 then size = font_width / 1.5 end
        svg.add_text3(x + width - padding_x - font_width / 2,
                     letter_y,
                     "middle",
                     size,
                     -2,
                     str)
      end
      x = x + width + 10
      if j == 4 then x = x + 20 end
    end
    y = y + height + key_gap_y
  end

  filename = "test.svg"
  svg.flush(filename, view_width, base_y)
end

main
class SvgWrapper
  def initialize
    @text = ""
  end

  def add_string(text)
    @text << text << "\n"
  end

  def add_line(x1, y1, x2, y2)
    add_string('<line x1="%s" y1="%s" x2="%s" y2="%s" stroke="black" />' % [x1, y1, x2, y2])
  end

  def add_dash(x1, y1, x2, y2)
    add_string('<line x1="%s" y1="%s" x2="%s" y2="%s" stroke="black" stroke-dasharray="5" />' % [x1, y1, x2, y2])
  end

  def escape(str)
    str.gsub!('&', "&amp;")
    str.gsub!('<', "&lt;")
    str.gsub!('>', "&gt;")
    return str
  end

  def add_text3(x, y, anchor, size, letter_spacing, text)
    add_string('<text x="%s" y="%s" text-anchor="%s" font-size="%s" letter-spacing="%s" dominant-baseline="central">%s</text>' % [x, y, anchor, size, letter_spacing, escape(text)])
  end

  def add_text2(x, y, anchor, size, text)
    add_string('<text x="%s" y="%s" text-anchor="%s" font-size="%s" dominant-baseline="central">%s</text>' % [x, y, anchor, size, text])
  end

  def add_text(x, y, text)
    add_string('<text x="%s" y="%s" text-anchor="middle" dominant-baseline="central">%s</text>' % [x, y, text])
  end

  def add_circle(cx, cy, r)
    add_string('<circle cx="%s" cy="%s" r="%s" />' % [cx, cy, r])
  end

  def add_rect(x, y, width, height)
    add_string('<rect x="%s" y="%s" width="%s" height="%s" fill="white" stroke="black" />' % [x, y, width, height])
  end

  def add_triangle(x, y, width, height)
    top_x = x
    top_y = y - height / 2
    left_x = x - width / 2
    left_y = y + height / 2
    right_x = x + width / 2
    right_y = y + height / 2
    add_string('<polygon points="%s,%s %s,%s %s,%s" fill="black" stroke="black" />' % [top_x, top_y, left_x, left_y, right_x, right_y])
  end

  def flush(file_name, view_width, base_y)
    File.open(file_name, "w") do |f| 
      f.printf('<svg xmlns="http://www.w3.org/2000/svg"')
      f.printf('     xmlns:xlink="http://www.w3.org/1999/xlink"')
      #f.printf('     viewBox="0 0 210 297">')
      f.printf('     width="%s" height="%s">', view_width, base_y)
      f.print(@text)
      f.printf('</svg>')
    end
  end
end

コメント

このブログの人気の投稿

五十音配列付き新下駄配列

WSLでの親指シフトはどうやらMozcで実現可能と気がつくまで

親指シフト新下駄配列の可能性