summaryrefslogtreecommitdiff
path: root/ugok/default_map.py
blob: 11eb50cbb2f445035c9a15e8ac6940bb7a4b4e48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# coding=utf-8

'''
uGOK default keymap

Copyright (C) 2007 Guillaume Seguin <guillaume@segu.in>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
'''

LSHIFT = "KEY_LEFTSHIFT"
RSHIFT = "KEY_RIGHTSHIFT"
CAPLCK = "KEY_CAPSLOCK"
ALTGR  = "KEY_RIGHTALT"

from key import Key

DEFAULT_KBMAP = [
        [
            Key ("Esc", "KEY_ESC"),
            Key ("f1", "KEY_F1", w = 25, small = True),
            Key ("f2", "KEY_F1", w = 25, small = True),
            Key ("f3", "KEY_F1", w = 25, small = True),
            Key ("f4", "KEY_F1", w = 25, small = True),
            Key ("f5", "KEY_F1", w = 25, small = True),
            Key ("f6", "KEY_F1", w = 25, small = True),
            Key ("f7", "KEY_F1", w = 25, small = True),
            Key ("f8", "KEY_F1", w = 25, small = True),
            Key ("f9", "KEY_F1", w = 25, small = True),
            Key ("f10", "KEY_F10", w = 25, small = True),
            Key ("f11", "KEY_F11", w = 25, small = True),
            Key ("f12", "KEY_F12", w = 25, small = True),
            Key ("⇞", "KEY_PAGEUP", w = 25),
            Key ("⇟", "KEY_PAGEDOWN", w = 25),
            Key ("⇈", "KEY_HOME", w = 25),
            Key ("⇊", "KEY_END", w = 25),
        ],
        [
            Key ("²", "KEY_GRAVE", w = 20, modifiers = {LSHIFT : "~",
                                                        RSHIFT : "~",
                                                        CAPLCK : "²",
                                                        ALTGR  : "¬"}),
            Key ("&", "KEY_1", w = 25, modifiers = {LSHIFT : "1",
                                                    RSHIFT : "1",
                                                    ALTGR  : "¹"}),
            Key ("é", "KEY_2", w = 25, modifiers = {LSHIFT : "2",
                                                    RSHIFT : "2",
                                                    CAPLCK : "É",
                                                    ALTGR  : "~"}),
            Key ('"', "KEY_3", w = 25, modifiers = {LSHIFT : "3",
                                                    RSHIFT : "3",
                                                    ALTGR  : "#"}),
            Key ("'", "KEY_4", w = 25, modifiers = {LSHIFT : "4",
                                                    RSHIFT : "4",
                                                    ALTGR  : "{"}),
            Key ("(", "KEY_5", w = 25, modifiers = {LSHIFT : "5",
                                                    RSHIFT : "5",
                                                    ALTGR  : "["}),
            Key ("-", "KEY_6", w = 25, modifiers = {LSHIFT : "6",
                                                    RSHIFT : "6",
                                                    ALTGR  : "|"}),
            Key ("è", "KEY_7", w = 25, modifiers = {LSHIFT : "7",
                                                    RSHIFT : "7",
                                                    CAPLCK : "È",
                                                    ALTGR  : "`"}),
            Key ("_", "KEY_8", w = 25, modifiers = {LSHIFT : "8",
                                                    RSHIFT : "8",
                                                    ALTGR  : "\\"}),
            Key ("ç", "KEY_9", w = 25, modifiers = {LSHIFT : "9",
                                                    RSHIFT : "9",
                                                    CAPLCK : "Ç",
                                                    ALTGR  : "^"}),
            Key ("à", "KEY_0", w = 25, modifiers = {LSHIFT : "0",
                                                    RSHIFT : "0",
                                                    CAPLCK : "À",
                                                    ALTGR  : "@"}),
            Key (")", "KEY_MINUS", w = 25, modifiers = {LSHIFT : "°",
                                                        RSHIFT : "°",
                                                        ALTGR  : "]"}),
            Key ("=", "KEY_EQUAL", w = 25, modifiers = {LSHIFT : "+",
                                                        RSHIFT : "+",
                                                        ALTGR  : "}"}),
            Key ("⟽      ", "KEY_BACKSPACE"),
            Key ("ins", "KEY_INSERT", small = True),
            Key ("dele", "KEY_DELETE", small = True),
        ],
        [
            Key ("⇆   ", "KEY_TAB"),
            Key ("a", "KEY_A", w = 25, modifiers = {LSHIFT : "A",
                                                    RSHIFT : "A",
                                                    CAPLCK : "A",
                                                    ALTGR  : "æ"}),
            Key ("z", "KEY_Z", w = 25, modifiers = {LSHIFT : "Z",
                                                    RSHIFT : "Z",
                                                    CAPLCK : "Z",
                                                    ALTGR  : "«"}),
            Key ("e", "KEY_E", w = 25, modifiers = {LSHIFT : "E",
                                                    RSHIFT : "E",
                                                    CAPLCK : "E",
                                                    ALTGR  : "€"}),
            Key ("r", "KEY_R", w = 25, modifiers = {LSHIFT : "R",
                                                    RSHIFT : "R",
                                                    CAPLCK : "R",
                                                    ALTGR  : "¶"}),
            Key ("t", "KEY_T", w = 25, modifiers = {LSHIFT : "T",
                                                    RSHIFT : "T",
                                                    CAPLCK : "T",
                                                    ALTGR  : "ŧ"}),
            Key ("y", "KEY_Y", w = 25, modifiers = {LSHIFT : "Y",
                                                    RSHIFT : "Y",
                                                    CAPLCK : "Y",
                                                    ALTGR  : "←"}),
            Key ("u", "KEY_U", w = 25, modifiers = {LSHIFT : "U",
                                                    RSHIFT : "U",
                                                    CAPLCK : "U",
                                                    ALTGR  : "↓"}),
            Key ("i", "KEY_I", w = 25, modifiers = {LSHIFT : "I",
                                                    RSHIFT : "I",
                                                    CAPLCK : "I",
                                                    ALTGR  : "→"}),
            Key ("o", "KEY_O", w = 25, modifiers = {LSHIFT : "O",
                                                    RSHIFT : "O",
                                                    CAPLCK : "O",
                                                    ALTGR  : "ø"}),
            Key ("p", "KEY_P", w = 25, modifiers = {LSHIFT : "P",
                                                    RSHIFT : "P",
                                                    CAPLCK : "P",
                                                    ALTGR  : "þ"}),
            Key ("^", "KEY_LEFTBRACE", w = 25, modifiers = {LSHIFT : "¨",
                                                            RSHIFT : "¨",
                                                            ALTGR  : "¨"}),
            Key ("$", "KEY_RIGHTBRACE", w = 25, modifiers = {LSHIFT : "£",
                                                             RSHIFT : "£",
                                                             ALTGR  : "¤"}),
            Key ("⏎   ", "KEY_ENTER", w = 50),
        ],
        [
            Key ("Caps", "KEY_CAPSLOCK", lock = True),
            Key ("q", "KEY_Q", w = 25, modifiers = {LSHIFT : "Q",
                                                    RSHIFT : "Q",
                                                    CAPLCK : "Q",
                                                    ALTGR  : "@"}),
            Key ("s", "KEY_S", w = 25, modifiers = {LSHIFT : "S",
                                                    RSHIFT : "S",
                                                    CAPLCK : "S",
                                                    ALTGR  : "ß"}),
            Key ("d", "KEY_D", w = 25, modifiers = {LSHIFT : "D",
                                                    RSHIFT : "D",
                                                    CAPLCK : "D",
                                                    ALTGR  : "ð"}),
            Key ("f", "KEY_F", w = 25, modifiers = {LSHIFT : "F",
                                                    RSHIFT : "F",
                                                    CAPLCK : "F",
                                                    ALTGR  : "đ"}),
            Key ("g", "KEY_G", w = 25, modifiers = {LSHIFT : "G",
                                                    RSHIFT : "G",
                                                    CAPLCK : "G",
                                                    ALTGR  : "ŋ"}),
            Key ("h", "KEY_H", w = 25, modifiers = {LSHIFT : "H",
                                                    RSHIFT : "H",
                                                    CAPLCK : "H",
                                                    ALTGR  : "ħ"}),
            Key ("j", "KEY_J", w = 25, modifiers = {LSHIFT : "J",
                                                    RSHIFT : "J",
                                                    CAPLCK : "J",
                                                    ALTGR  : "j"}),
            Key ("k", "KEY_K", w = 25, modifiers = {LSHIFT : "K",
                                                    RSHIFT : "K",
                                                    CAPLCK : "K",
                                                    ALTGR  : "ĸ"}),
            Key ("l", "KEY_L", w = 25, modifiers = {LSHIFT : "L",
                                                    RSHIFT : "L",
                                                    CAPLCK : "L",
                                                    ALTGR  : "ł"}),
            Key ("m", "KEY_M", w = 25, modifiers = {LSHIFT : "M",
                                                    RSHIFT : "M",
                                                    CAPLCK : "M",
                                                    ALTGR  : "µ"}),
            Key ("ù", "KEY_APOSTROPHE", w = 25, modifiers = {LSHIFT : "%",
                                                             RSHIFT : "%",
                                                             CAPLCK : "Ù",
                                                             ALTGR  : "^"}),
            Key ("*", "KEY_BACKSLASH", w = 25, modifiers = {LSHIFT : "µ",
                                                            RSHIFT : "µ",
                                                            ALTGR  : "`"}),
            Key ("⏎   ", "KEY_ENTER", w = 45),
        ],
        [
            Key ("⇧   ", "KEY_LEFTSHIFT", sticky = True),
            Key ("<", "KEY_102ND", w = 20, modifiers = {LSHIFT : ">",
                                                        RSHIFT : ">",
                                                        ALTGR  : "|"}),
            Key ("w", "KEY_W", w = 25, modifiers = {LSHIFT : "W",
                                                    RSHIFT : "W",
                                                    CAPLCK : "W",
                                                    ALTGR  : "ł"}),
            Key ("x", "KEY_X", w = 25, modifiers = {LSHIFT : "X",
                                                    RSHIFT : "X",
                                                    CAPLCK : "X",
                                                    ALTGR  : "»"}),
            Key ("c", "KEY_C", w = 25, modifiers = {LSHIFT : "C",
                                                    RSHIFT : "C",
                                                    CAPLCK : "C",
                                                    ALTGR  : "¢"}),
            Key ("v", "KEY_V", w = 25, modifiers = {LSHIFT : "V",
                                                    RSHIFT : "V",
                                                    CAPLCK : "V",
                                                    ALTGR  : "“"}),
            Key ("b", "KEY_B", w = 25, modifiers = {LSHIFT : "B",
                                                    RSHIFT : "B",
                                                    CAPLCK : "B",
                                                    ALTGR  : "”"}),
            Key ("n", "KEY_N", w = 25, modifiers = {LSHIFT : "N",
                                                    RSHIFT : "N",
                                                    CAPLCK : "N",
                                                    ALTGR  : "n"}),
            Key (",", "KEY_COMMA", w = 25, modifiers = {LSHIFT : "?",
                                                        RSHIFT : "?",
                                                        ALTGR  : "'"}),
            Key (";", "KEY_SEMICOLON", w = 25, modifiers = {LSHIFT : ".",
                                                            RSHIFT : ".",
                                                            ALTGR  : ""}),
            Key (":", "KEY_DOT", w = 25, modifiers = {LSHIFT : "/",
                                                      RSHIFT : "/",
                                                      ALTGR  : "·"}),
            Key ("!", "KEY_SLASH", w = 25, modifiers = {LSHIFT : "§",
                                                        RSHIFT : "§",
                                                        ALTGR  : ""}),
            Key ("⇧        ", "KEY_RIGHTSHIFT", sticky = True),
            Key ("▲", "KEY_UP"),
        ],
        [
            Key ("Ctrl ", "KEY_LEFTCTRL", sticky = True),
            Key (" ☼ ", "KEY_LEFTMETA", sticky = True),
            Key ("Alt ", "KEY_LEFTALT", sticky = True),
            Key (" " * 27, "KEY_SPACE"),
            Key ("AltGr", "KEY_RIGHTALT", sticky = True),
            Key (" ☼ ", "KEY_RIGHTMETA"),
            Key ("▤", "KEY_MENU", w = 23),
            Key ("Ctrl ", "KEY_RIGHTCTRL", sticky = True),
            Key ("◄", "KEY_LEFT"),
            Key ("▼", "KEY_DOWN"),
            Key ("►", "KEY_RIGHT"),
        ],
    ]