blechmusikの日記

キー・カスタマイズ・ソフトウェア "DvorakJ" の覚え書きをはじめとして様々なことを書いています。

「きゅうり改」を実装しなおした

[ruby-list:28053] Re: きゅうりについての設定ファイルを参考にして、「きゅうり改」のDvorakJ 用設定ファイルを作り直した。顔文字を全角記号で出力してしまうのが問題である。これについては、対処方法が思い浮かばない。
設定ファイルの内容は以下の通りだ。

順に打鍵する配列

/*
 * まつもとゆきひろのハッカーズライフ:第2回 キーボードへのこだわり (2/2) - ITmedia エンタープライズ
 * http://www.itmedia.co.jp/enterprise/articles/0704/24/news006_2.html
 * 
 *    [ruby-list:28053] Re: きゅうりについて
 *    http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/28053
 *    
 *    GMNRPV    ゃゅょー
 *    YHKST    AUIOE
 *    ZWBD    小んっ、。
 */

-option[
    [1] | -02
    [2] | -03
    [3] | -04
    [4] | -05
    [5] | -06
    [6] | -07
    [7] | -08
    [8] | -09
    [9] | -0A
    [0] | -0B
    [-] | -0C
    [^] | -0D

    [q] | -10
    [w] | -11
    [e] | -12
    [r] | -13
    [t] | -14

    [y] | -15
    [u] | -16
    [i] | -17
    [o] | -18
    [p] | -19
    [@] | -1A
    [[] | -1B

    [a] | -1E
    [s] | -1F
    [d] | -20
    [f] | -21
    [g] | -22

    [h] | -23
    [j] | -24
    [k] | -25
    [l] | -26
    [;] | -27
    [:] | -28
    []] | -2B

    [z] | -2C
    [x] | -2D
    [c] | -2E
    [v] | -2F
    [b] | -30

    [n] | -31
    [m] | -32
    [,] | -33
    [.] | -34
    [/] | -35
    [\] | -73



    {カ行} | [d]
    {サ行} | [f]
    {タ行} | [g]
    {ナ行} | [e]
    {ハ行} | [s]
    {マ行} | [w]
    {ヤ行} | [a]
    {ラ行} | [r]
    {ワ行} | [x]

    {ガ行} | [q]
    {ザ行} | [z]
    {ダ行} | [v]
    {バ行} | [c]
    {パ行} | [t]
    {ヴァ行} | [y]

    {小捨て仮名} | [b]


    {ゃ+あ} | {カ行}[u], {ガ行}[u], {サ行}[u], {ザ行}[u], {ナ行}[u]
    {ゅ+う} | {カ行}[i], {ガ行}[i], {サ行}[i], {ザ行}[i], {ナ行}[i]
    {ょ+う} | {カ行}[o], {ガ行}[o], {サ行}[o], {ザ行}[o], {ナ行}[o]

    {ゃ+あ} | {ゃ+あ}, {ハ行}[u], {バ行}[u], {パ行}[u], {マ行}[u], {ヤ行}[u], [u]
    {ゅ+う} | {ゅ+う}, {ハ行}[i], {バ行}[i], {パ行}[i], {マ行}[i], {ヤ行}[i], [i]
    {ょ+う} | {ょ+う}, {ハ行}[o], {バ行}[o], {パ行}[o], {マ行}[o], {ヤ行}[o], [o]


    {ゅ+う} | {ゅ+う}, {タ行}{小捨て仮名}[i], {ダ行}{小捨て仮名}[i], {ハ行}{小捨て仮名}[i]
]


/* 単打 */
    [
    1|2|3|4|5|6|7|8|9|0|
      |  |  |  |  |  |ゃ|ゅ|ょ|ー|
      |  |  |  |  |あ|う|い|お|え|
      |  |  |  |  |ん|っ|、|。|  |
    ]


/* カ行 */
    {カ行}, {カ行}{カ行}[
      |
      |  |  |  |  |  |きゃ|きゅ|きょ|  |
      |  |っ|  |  |か|く  |き  |こ  |け|
      |
    ]

    {カ行}{小捨て仮名}, {カ行}{カ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |くぁ|  |くぃ|くぉ|くぇ|
      |
    ]

    {カ行}{ワ行}, {カ行}{カ行}{ワ行}[
      |
      |
      |  |  |  |  |くゎ|  |  |  |  |
      |
    ]

/* ガ行 */
    {ガ行}, {ガ行}{ガ行}[
      |
      |  |  |  |  |  |ぎゃ|ぎゅ|ぎょ|  |
      |  |  |  |  |が|ぐ  |ぎ  |ご  |げ|
      |
    ]

    {ガ行}{小捨て仮名}, {ガ行}{ガ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |ぐぁ|  |ぐぃ|ぐぉ|ぐぇ|
      |
    ]

    {ガ行}{ワ行}, {ガ行}{ガ行}{ワ行}[
      |
      |
      |  |  |  |  |ぐゎ|  |  |  |  |
      |
    ]


/* サ行 */
    {サ行},{サ行}{サ行}[
      |
      |  |  |  |  |  |しゃ|しゅ|しょ|  |
      |  |  |っ|  |さ|す  |し  |そ  |せ|
      |
    ]

    {サ行}{小捨て仮名},{サ行}{サ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |しゃ|しゅ|すぃ|  |しぇ|
      |
    ]


/* ザ行 */
    {ザ行}, {ザ行}{ザ行}[
      |
      |  |  |  |  |  |じゃ|じゅ|じょ|  |
      |  |  |  |  |ざ|ず  |じ  |ぞ  |ぜ|
    っ|  |  |  |  |
    ]

    {ザ行}{小捨て仮名}, {ザ行}{ザ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |じゃ|じゅ|ずぃ|  |じぇ|
      |
    ]

/* タ行 */
    {タ行}, {タ行}{タ行}[
      |
      |  |  |  |  |  |ちゃ|ちゅ|ちょ|  |
      |  |  |  |っ|た|つ  |ち  |と  |て|
      |
    ]

    {タ行}{小捨て仮名}, {タ行}{タ行}{小捨て仮名}[
      |
      |  |  |  |  |    |    |てゅ|    |  |
      |  |  |  |  |つぁ|とぅ|てぃ|つぉ|  |
      |
    ]

    {タ行}{ワ行}, {タ行}{タ行}{ワ行}[
      |
      |
      |  |  |  |  |つぁ|  |つぃ|つぉ|つぇ|
      |
    ]


/* ダ行 */
    {ダ行}, {ダ行}{ダ行}[
      |
      |    |    |  |  |  |ぢゃ|ぢゅ|ぢょ|  |
      |でな|でき|で|  |だ|づ  |ぢ  |ど  |で|
      |    |    |っ|  |
    ]

    {ダ行}{小捨て仮名}, {ダ行}{ダ行}{小捨て仮名}[
      |
      |  |  |  |  |    |    |でゅ|    |    |
      |  |  |  |  |ぢゃ|どぅ|でぃ|ぢょ|ぢぇ|
      |
    ]

    {ダ行}[f], {ダ行}{ダ行}[f][
      |
      |
      |  |すか|  |  |  |  |  |  |  |
      |
    ]

/* ナ行 */
    {ナ行}, {ナ行}{ナ行}[
      |
      |  |っ|  |  |  |にゃ|にゅ|にょ|  |
      |  |  |  |  |な|ぬ  |に  |の  |ね|
      |
    ]

    {ナ行}{小捨て仮名}, {ナ行}{ナ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |にゃ|にゅ|  |にょ|ニェ|
      |
    ]

/* ハ行 */
    {ハ行}, {ハ行}{ハ行}[
      |
      |  |  |  |  |  |ひゃ|ひゅ|ひょ|  |
      |  |  |っ|  |は|ふ  |ひ  |ほ  |へ|
      |
    ]

    {ハ行}{小捨て仮名}, {ハ行}{ハ行}{小捨て仮名}[
      |
      |  |  |  |  |    |    |フュ|    |    |
      |  |  |  |  |ファ|フィ|    |フォ|フェ|
      |
    ]

/* バ行 */
    {バ行}, {バ行}{バ行}[
      |
      |  |  |  |  |  |びゃ|びゅ|びょ|  |
      |  |  |  |  |ば|ぶ  |び  |ぼ  |べ|
      |  |っ|  |  |
    ]

    {バ行}{小捨て仮名}, {バ行}{バ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |びゃ|びゅ|  |びょ|びぇ|
      |
    ]

/* パ行 */
    {パ行}, {パ行}{パ行}, {ヤ行}{ヤ行}[
      |
      |  |  |  |っ|  |ぴゃ|ぴゅ|ぴょ|  |
      |  |  |  |  |ぱ|ぷ  |ぴ  |ぽ  |ぺ|
      |
    ]

    {パ行}{小捨て仮名}, {パ行}{パ行}{小捨て仮名}, {ヤ行}{ヤ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |ぴゃ|ぴゅ|  |ぴょ|ぴぇ|
      |
    ]


/* マ行 */
    {マ行}[
      |
      |  |  |  |  |  |みゃ|みゅ|みょ|  |
      |  |  |ま|  |ま|む  |み  |も  |め|
      |
    ]

    {マ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |みゃ|みゅ|  |みょ|みぇ|
      |
    ]

    {マ行}[f][
      |
      |
      |  |すか|  |  |    |  |  |  |  |
      |  |    |  |  |せん|  |  |  |  |
    ]

/* ヤ行 */
    {ヤ行}[
      |  |  |  |  |  |    |  |  |    |
      |  |  |  |  |  |    |  |  |    |
      |  |  |  |  |や|イィ|ゆ|よ|イェ|
      |  |  |  |  |  |    |  |  |    |
    ]


/* ラ行 */
    {ラ行}, {ラ行}{ラ行}[
      |
      |  |  |っ|  |  |りゃ|りゅ|りょ|  |
      |  |  |  |  |ら|る  |り  |ろ  |れ|
      |
    ]

    {ラ行}{小捨て仮名}, {ラ行}{ラ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |りゃ|りゅ|  |りょ|りぇ|
      |
    ]

/* ワ行 */
    {ワ行}, {マ行}{マ行}[
      |
      |  |  |  |  |  |ゐゃ|ゐゅ|ゐょ|  |
      |  |  |  |  |わ|    |ゐ  |を  |ゑ|
      |
    ]


/* ヴァ */
    {ヴァ行}, {ワ行}{ワ行}[
      |
      |  |  |  |  |    |ヴャ|ヴュ|ヴョ|    |
      |  |  |  |  |ヴァ|ヴ  |ヴィ|ヴォ|ヴェ|
      |
    ]

    {ヴァ行}{小捨て仮名}, {ワ行}{ワ行}{小捨て仮名}[
      |
      |
      |  |  |  |  |ヴャ|ヴュ|ヴィ|ヴョ|ヴェ|
      |
    ]

/* 小捨 */
    {小捨て仮名}[
      |
      |  |  |  |  |  |ゃ|ゅ|ょ|  |
      |  |  |  |  |ぁ|ぅ|ぃ|ぉ|ぇ|
      |
    ]

    {小捨て仮名}{ワ行}[
      |
      |
      |  |  |  |  |ゎ|っ|  |  |  |
      |
    ]


/* ゃ+あ */
    {ゃ+あ}[
      |
      |  |  |  |  |  |あ|  |  |  |
      |
      |
    ]

/* ゅ+う */
    {ゅ+う}[
      |
      |  |  |  |  |  |  |う|  |  |
      |
      |
    ]

/* ょ+う */
    {ょ+う}[
      |
      |  |  |  |  |  |  |  |う|  |
      |
      |
    ]


/* 記号[X] */

    -shift[x][
    ○|▽|△|□|◇|☆|◎|¢|♂|♀|〜|±|\|
    《|》|々|〆|  |  |  |  |〒|『|〔|  |
      |ヽ|ゝ|〃|‐|←|↓|↑|→|  |‘|´|
      |:-|〇|※|°|′|″|‥|…|・|  |
    ]

    -shift[x]-shift[
    ●|▼ |▲|■|◆|★|£|×|【|】|∴|≒|‖|
    〈|〉 |仝|§|  |  |  |  |↑|』|〕|  |
      |ヾ |ゞ|→|―|  |  |  |  |゜|“|¨|
      |:-)|℃|÷|←|↓|〓|≦|≧|∞|  |
    ]

/* 記号[z] */

    [z][
    ○|▽|△|□|◇|☆|◎|¢|♂|♀|〜|±|\|
      |  |  |  |  |  |  |  |  |〜|『|』|
      |  |  |  |  |  |  |  |  |  |‘|´|
      |{^}{^};;;|  |  |  |  |  |‥|…|・|  |
    ]

    [z]-shift[
    ●|▼|▲|■|◆|★|£|×|【|】|∴|≒|‖|
      |  |  |  |  |  |  |  |  |  |〔|〕|
      |  |  |  |  |  |  |  |  |゜|“|¨|
      |({^}{^})|  |  |  |  |  |≦|≧|∞|  |
    ]

/* 記号[@] */

    -shift[2][
      |‥|…|  |  |  |  |  |  |○|―|  |\|
      |  |  |  |  |  |  |  |  |  |[|]|
      |  |  |  |  |  |  |  |  |  |‘|´|
      |  |  |  |  |  |  |,|.|/|  |
    ]

    -shift[2]-shift[
      |@|  |  |  |  |  |×|  |  |  |〓|||
      |  |  |  |  |  |  |  |  |  |{|}|
      |  |  |  |  |  |  |  |  |  |〃|〜|
      |  |  |  |  |  |  |《|》|  |  |
    ]


/* 記号[~] */

    -shift[]][
    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|,|.|/| |
    ]

    -shift[]]-shift[
    {!}|@ |{#}|$ |% |{^}|{&}|* |( |) |_  |{+}|@@@|
       |  |   |  |  |   |   |  |  |  |{{}|{}}|
       |  |   |  |  |   |   |  |  |: |"  |~  |
       |  |   |  |  |   |   |< |> |? |   |
    ]


/* 記号[Z] */

    -shift[z][
    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|,|.|/|  |
    ]

    -shift[z]-shift[
    !|@|#|$|%|^|&|*|(|)|_|+|||
    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|<|>|?|  |
    ]


/* 数字 */
    [0],[1],[2],[3],[4],[5],[6],[7],[8],[9][
      |
      |
      |
      |  |  |  |  |  |  |, |. |  |  |
    ]