File: cyr-serbian.cpp

package info (click to toggle)
console-cyrillic 0.9-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,216 kB
  • ctags: 118
  • sloc: cpp: 3,917; sh: 3,154; perl: 738; makefile: 139
file content (273 lines) | stat: -rw-r--r-- 6,636 bytes parent folder | download | duplicates (10)
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
/* This file should be preprocessed with cpp.  It is based on the
   system of macroses developed by Cyril Slobin <slobin@iname.com>. */
#ifndef ENCODING
# include "iso8859-5.enc"
# define ENCODING iso8859-5
#endif

! This is Serbian Cyrillic keyboard translation table for Linux console
! driver.  Right_Controll key is used for Cyrillic toggle, Right_Alt for
! temporary shift to Cyrillic.  On extended 104-key keyboards, the
! System key is also used for toggle and Window keys for temporary
! shift.  The arrangement of the Cyrillic letters is according to the
! keyboard mapping made by Milos Rancic <millosh@isgf.grf.bg.ac.yu>.
! (this is official standard in Yugoslavia).
!
!
!

#include "macros.inc"

CC(1, Escape, Escape)

PPPPC(2, one, exclam, one, exclam, VoidSymbol)
PPPPC(3, two, at, two, quotedbl, nul)
PPPPC(4, three, numbersign, three, numbersign, Escape)
PPPPC(5, four, dollar, four, dollar, Control_backslash)
PPPPC(6, five, percent, five, percent, Control_bracketright)
PPPPC(7, six, asciicircum, six, ampersand, Control_asciicircum)
PPPPC(8, seven, ampersand, seven, slash, Control_underscore)
PPPPC(9, eight, asterisk, eight, parenleft, Delete)
PPPPC(10, nine, parenleft, nine, parenright, VoidSymbol)
PPPPC(11, zero, parenright, zero, equal, VoidSymbol)
PPPPC(12, minus, underscore, apostrophe, question, Control_underscore)
PPPPC(13, equal, plus, plus, asterisk, VoidSymbol)

BACKSPACE_KEY
CC(15, Tab, Tab)

LLRR(16, q, Q, cyr_lje, CYR_LJE)
LLRR(17, w, W, cyr_nje, CYR_NJE)
LLRR(18, e, E, cyr_ie, CYR_IE)
LLRR(19, r, R, cyr_er, CYR_ER)
LLRR(20, t, T, cyr_te, CYR_TE)
LLRR(21, y, Y, cyr_ze, CYR_ZE)
LLRR(22, u, U, cyr_u, CYR_U)
LLRR(23, i, I, cyr_i, CYR_I)
LLRR(24, o, O, cyr_o, CYR_O)
LLRR(25, p, P, cyr_pe, CYR_PE)

PPRRC(26, bracketleft, braceleft, cyr_sha, CYR_SHA, Escape)
PPRRC(27, bracketright, braceright, bracketleft, bracketright, Control_bracketright)

CC(28, Return, Return)

SPEC(29, LEFT_CONTROL)

LLRR(30, a, A, cyr_a, CYR_A)
LLRR(31, s, S, cyr_es, CYR_ES)
LLRR(32, d, D, cyr_de, CYR_DE)
LLRR(33, f, F, cyr_ef, CYR_EF)
LLRR(34, g, G, cyr_ghe, CYR_GHE)
LLRR(35, h, H, cyr_ha, CYR_HA)
LLRR(36, j, J, cyr_je, CYR_JE)
LLRR(37, k, K, cyr_ka, CYR_KA)
LLRR(38, l, L, cyr_el, CYR_EL)

PPRRC(39, semicolon, colon, cyr_che, CYR_CHE, VoidSymbol)
PPRRC(40, apostrophe, quotedbl, cyr_tshe, CYR_TSHE, Control_g)
PPRRC(41, grave, asciitilde, grave, asciitilde, nul)

SPEC(42, LEFT_SHIFT)

PPPPC(43, backslash, bar, minus, underscore, Control_backslash)

LLRR(44, z, Z, cyr_dje, CYR_DJE)
LLRR(45, x, X, cyr_dzhe, CYR_DZHE)
LLRR(46, c, C, cyr_tse, CYR_TSE)
LLRR(47, v, V, cyr_ve, CYR_VE)
LLRR(48, b, B, cyr_be, CYR_BE)
LLRR(49, n, N, cyr_en, CYR_EN)
LLRR(50, m, M, cyr_em, CYR_EM)

PPRRC(51, comma, less, comma, semicolon, VoidSymbol)

PPRRC(52, period, greater, period, colon, VoidSymbol)
        control         keycode 52 = Compose
        control altgr   keycode 52 = Compose

PPPPC(53, slash, question, cyr_zhe, CYR_ZHE, Delete)

SPEC(54, RIGHT_SHIFT)

SPEC(55, KP_Multiply)

SPEC(56, LEFT_ALT)

CC(57, space, nul)

SPEC(58, Caps_Lock)

FUNC(59, 1, 11)
FUNC(60, 2, 12)
FUNC(61, 3, 13)
FUNC(62, 4, 14)
FUNC(63, 5, 15)
FUNC(64, 6, 16)
FUNC(65, 7, 17)
FUNC(66, 8, 18)
FUNC(67, 9, 19)
FUNC(68, 10, 20)

SPEC(69, Num_Lock)

SPEC(70, Scroll_Lock)
        shift           keycode 70 = Show_Memory
        shift   altgr   keycode 70 = Show_Memory
        control         keycode 70 = Show_State
        control altgr   keycode 70 = Show_State
        alt             keycode 70 = Show_Registers
        alt     altgr   keycode 70 = Show_Registers

SPEC(71, KP_7)
        alt         keycode 71 = Ascii_7
        alt altgr   keycode 71 = Ascii_7

SPEC(72, KP_8)
        alt         keycode 72 = Ascii_8
        alt altgr   keycode 72 = Ascii_8

SPEC(73, KP_9)
        alt         keycode 73 = Ascii_9
        alt altgr   keycode 73 = Ascii_9

SPEC(74, KP_Subtract)

SPEC(75, KP_4)
        alt         keycode 75 = Ascii_4
        alt altgr   keycode 75 = Ascii_4

SPEC(76, KP_5)
        alt         keycode 76 = Ascii_5
        alt altgr   keycode 76 = Ascii_5

SPEC(77, KP_6)
        alt         keycode 77 = Ascii_6
        alt altgr   keycode 77 = Ascii_6

SPEC(78, KP_Add)

SPEC(79, KP_1)
        alt         keycode 79 = Ascii_1
        alt altgr   keycode 79 = Ascii_1

SPEC(80, KP_2)
        alt         keycode 80 = Ascii_2
        alt altgr   keycode 80 = Ascii_2

SPEC(81, KP_3)
        alt         keycode 81 = Ascii_3
        alt altgr   keycode 81 = Ascii_3

SPEC(82, KP_0)
        alt         keycode 82 = Ascii_0
        alt altgr   keycode 82 = Ascii_0

SPEC(83, KP_Period)
        control alt             keycode 83 = Boot
        control alt     altgr   keycode 83 = Boot

SPEC(84, Last_Console)

NONE(85)

PPPPC(86, less, greater, less, greater, VoidSymbol)

FUNC(87, 11, 11)
FUNC(88, 12, 12)

NONE(89)
NONE(90)
NONE(91)
NONE(92)
NONE(93)
NONE(94)
NONE(95)

SPEC(96, KP_Enter)

SPEC(97, RIGHT_CONTROL)

SPEC(98, KP_Divide)

CC(99, Control_backslash, Control_backslash)

SPEC(100, RIGHT_ALT)

SPEC(101, Break)
SPEC(102, Home)

SPEC(103, Up)

SPEC(104, PageUp)
        shift           keycode 104 = Scroll_Backward
        shift   altgr   keycode 104 = Scroll_Backward

SPEC(105, Left)
        alt         keycode 105 = Decr_Console
        alt altgr   keycode 105 = Decr_Console

SPEC(106, Right)
        alt         keycode 106 = Incr_Console
        alt altgr   keycode 106 = Incr_Console

SPEC(107, End)
SPEC(108, Down)

SPEC(109, PageDown)
        shift           keycode 109 = Scroll_Forward
        shift   altgr   keycode 109 = Scroll_Forward

SPEC(110, Insert)

SPEC(111, Remove)
        control alt         keycode 111 = Boot
        control alt altgr   keycode 111 = Boot

SPEC(112, Macro)
SPEC(113, F13)
SPEC(114, F14)
SPEC(115, Help)
SPEC(116, Do)
SPEC(117, F17)
SPEC(118, KP_MinPlus)
SPEC(119, Pause)

NONE(120)
NONE(121)
NONE(122)
NONE(123)
NONE(124)

SPEC(125, LEFT_WINDOW)
SPEC(126, RIGHT_WINDOW)
SPEC(127, SYSTEM_MENU)

string F1 = "\033[[A"
string F2 = "\033[[B"
string F3 = "\033[[C"
string F4 = "\033[[D"
string F5 = "\033[[E"
string F6 = "\033[17~"
string F7 = "\033[18~"
string F8 = "\033[19~"
string F9 = "\033[20~"
string F10 = "\033[21~"
string F11 = "\033[23~"
string F12 = "\033[24~"
string F13 = "\033[25~"
string F14 = "\033[26~"
string F15 = "\033[28~"
string F16 = "\033[29~"
string F17 = "\033[31~"
string F18 = "\033[32~"
string F19 = "\033[33~"
string F20 = "\033[34~"
string Find = "\033[1~"
string Insert = "\033[2~"
string Remove = "\033[3~"
string Select = "\033[4~"
string Prior = "\033[5~"
string Next = "\033[6~"
string Macro = "\033[M"
string Pause = "\033[P"