~iamsylvie/ubuntu-keyboard/ubuntu-keyboard

« back to all changes in this revision

Viewing changes to plugins/ja/qml/keys/modifier.js

  • Committer: CI Train Bot
  • Author(s): Mitsuya Shibata
  • Date: 2016-02-22 11:04:18 UTC
  • mfrom: (402.2.16 japanese-keyboard-rebooted)
  • Revision ID: ci-train-bot@canonical.com-20160222110418-1hn0utyw7pj0gsqf
Implement Japanese keyboard layout Fixes: #1290031
Approved by: Ken VanDine

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2015 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
.pragma library
 
18
 
 
19
/*
 
20
 * Modified character map for ModifierKey
 
21
 *
 
22
 * ModifierKey modify a charcter by left/right/up swipe. This is character map
 
23
 * and swipe direction.
 
24
 *   map[ORIGIN KEY] = [NO MODIFY, LEFT, UP, RIGHT]
 
25
 */
 
26
var map = {}
 
27
map["あ"] = ["あ", "", "ぁ", ""]
 
28
map["い"] = ["い", "", "ぃ", ""]
 
29
map["う"] = ["う", "ヴ", "ぅ", ""]
 
30
map["え"] = ["え", "", "ぇ", ""]
 
31
map["お"] = ["お", "", "ぉ", ""]
 
32
map["か"] = ["か", "が", "", ""]
 
33
map["き"] = ["き", "ぎ", "", ""]
 
34
map["く"] = ["く", "ぐ", "", ""]
 
35
map["け"] = ["け", "げ", "", ""]
 
36
map["こ"] = ["こ", "ご", "", ""]
 
37
map["さ"] = ["さ", "ざ", "", ""]
 
38
map["し"] = ["し", "じ", "", ""]
 
39
map["す"] = ["す", "ず", "", ""]
 
40
map["せ"] = ["せ", "ぜ", "", ""]
 
41
map["そ"] = ["そ", "ぞ", "", ""]
 
42
map["た"] = ["た", "だ", "", ""]
 
43
map["ち"] = ["ち", "ぢ", "", ""]
 
44
map["つ"] = ["つ", "づ", "っ", ""]
 
45
map["て"] = ["て", "で", "", ""]
 
46
map["と"] = ["と", "ど", "", ""]
 
47
map["は"] = ["は", "ば", "", "ぱ"]
 
48
map["ひ"] = ["ひ", "び", "", "ぴ"]
 
49
map["ふ"] = ["ふ", "ぶ", "", "ぷ"]
 
50
map["へ"] = ["へ", "べ", "", "ぺ"]
 
51
map["ほ"] = ["ほ", "ぼ", "", "ぽ"]
 
52
map["や"] = ["や", "", "ゃ", ""]
 
53
map["("] = ["(", "「", "『", "【"]
 
54
map["ゆ"] = ["ゆ", "", "ゅ", ""]
 
55
map[")"] = [")", "」", "』", "】"]
 
56
map["よ"] = ["よ", "", "ょ", ""]
 
57
map["わ"] = ["わ", "ゐ", "ゎ", "ゑ"]
 
58
map["ー"] = ["ー", "=", "~", "+"]
 
59
map["、"] = ["、", "・", "…", "@"]
 
60
map["。"] = ["。", ":", ";", "♪"]
 
61
 
 
62
/*
 
63
 * Reverse map for ModifierKey map
 
64
 *
 
65
 * This map is reverse map for modified characters.
 
66
 */
 
67
var normalize = {}
 
68
normalize["ぁ"] = "あ"
 
69
normalize["ぃ"] = "い"
 
70
normalize["ヴ"] = "う"; normalize["ぅ"] = "う"
 
71
normalize["ぇ"] = "え"
 
72
normalize["ぉ"] = "お"
 
73
normalize["が"] = "か"
 
74
normalize["ぎ"] = "き"
 
75
normalize["ぐ"] = "く"
 
76
normalize["げ"] = "け"
 
77
normalize["ご"] = "こ"
 
78
normalize["ざ"] = "さ"
 
79
normalize["じ"] = "し"
 
80
normalize["ず"] = "す"
 
81
normalize["ぜ"] = "せ"
 
82
normalize["ぞ"] = "そ"
 
83
normalize["だ"] = "た"
 
84
normalize["ぢ"] = "ち"
 
85
normalize["づ"] = "つ"; normalize["っ"] = "つ"
 
86
normalize["で"] = "て"
 
87
normalize["ど"] = "と"
 
88
normalize["ば"] = "は"; normalize["ぱ"] = "は"
 
89
normalize["び"] = "ひ"; normalize["ぴ"] = "ひ"
 
90
normalize["ぶ"] = "ふ"; normalize["ぷ"] = "ふ"
 
91
normalize["べ"] = "へ"; normalize["ぺ"] = "へ"
 
92
normalize["ぼ"] = "ほ"; normalize["ぽ"] = "ほ"
 
93
normalize["ゃ"] = "や"
 
94
normalize["「"] = "("; normalize["『"] = "("; normalize["【"] = "("
 
95
normalize["ゅ"] = "ゆ"
 
96
normalize["」"] = ")"; normalize["』"] = ")"; normalize["】"] = ")"
 
97
normalize["ょ"] = "よ"
 
98
normalize["ゐ"] = "わ"; normalize["ゎ"] = "わ"; normalize["ゑ"] = "わ"
 
99
normalize["="] = "ー"; normalize["~"] = "ー"; normalize["+"] = "ー"
 
100
normalize["・"] = "、"; normalize["…"] = "、"; normalize["@"] = "、"
 
101
normalize[":"] = "。"; normalize[";"] = "。"; normalize["♪"] = "。"
 
102