Flutter Linux Embedder
key_mapping.g.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "key_mapping.h"
6 
7 #include <glib.h>
8 #include <map>
9 
11 
12 // DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
13 // This file is generated by
14 // flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
15 // be edited directly.
16 //
17 // Edit the template dev/tools/gen_keycodes/data/gtk_key_mapping_cc.tmpl
18 // instead. See dev/tools/gen_keycodes/README.md for more information.
19 
20 std::map<uint64_t, uint64_t> xkb_to_physical_key_map = {
21  {0x00000009, 0x00070029}, // escape
22  {0x0000000a, 0x0007001e}, // digit1
23  {0x0000000b, 0x0007001f}, // digit2
24  {0x0000000c, 0x00070020}, // digit3
25  {0x0000000d, 0x00070021}, // digit4
26  {0x0000000e, 0x00070022}, // digit5
27  {0x0000000f, 0x00070023}, // digit6
28  {0x00000010, 0x00070024}, // digit7
29  {0x00000011, 0x00070025}, // digit8
30  {0x00000012, 0x00070026}, // digit9
31  {0x00000013, 0x00070027}, // digit0
32  {0x00000014, 0x0007002d}, // minus
33  {0x00000015, 0x0007002e}, // equal
34  {0x00000016, 0x0007002a}, // backspace
35  {0x00000017, 0x0007002b}, // tab
36  {0x00000018, 0x00070014}, // keyQ
37  {0x00000019, 0x0007001a}, // keyW
38  {0x0000001a, 0x00070008}, // keyE
39  {0x0000001b, 0x00070015}, // keyR
40  {0x0000001c, 0x00070017}, // keyT
41  {0x0000001d, 0x0007001c}, // keyY
42  {0x0000001e, 0x00070018}, // keyU
43  {0x0000001f, 0x0007000c}, // keyI
44  {0x00000020, 0x00070012}, // keyO
45  {0x00000021, 0x00070013}, // keyP
46  {0x00000022, 0x0007002f}, // bracketLeft
47  {0x00000023, 0x00070030}, // bracketRight
48  {0x00000024, 0x00070028}, // enter
49  {0x00000025, 0x000700e0}, // controlLeft
50  {0x00000026, 0x00070004}, // keyA
51  {0x00000027, 0x00070016}, // keyS
52  {0x00000028, 0x00070007}, // keyD
53  {0x00000029, 0x00070009}, // keyF
54  {0x0000002a, 0x0007000a}, // keyG
55  {0x0000002b, 0x0007000b}, // keyH
56  {0x0000002c, 0x0007000d}, // keyJ
57  {0x0000002d, 0x0007000e}, // keyK
58  {0x0000002e, 0x0007000f}, // keyL
59  {0x0000002f, 0x00070033}, // semicolon
60  {0x00000030, 0x00070034}, // quote
61  {0x00000031, 0x00070035}, // backquote
62  {0x00000032, 0x000700e1}, // shiftLeft
63  {0x00000033, 0x00070031}, // backslash
64  {0x00000034, 0x0007001d}, // keyZ
65  {0x00000035, 0x0007001b}, // keyX
66  {0x00000036, 0x00070006}, // keyC
67  {0x00000037, 0x00070019}, // keyV
68  {0x00000038, 0x00070005}, // keyB
69  {0x00000039, 0x00070011}, // keyN
70  {0x0000003a, 0x00070010}, // keyM
71  {0x0000003b, 0x00070036}, // comma
72  {0x0000003c, 0x00070037}, // period
73  {0x0000003d, 0x00070038}, // slash
74  {0x0000003e, 0x000700e5}, // shiftRight
75  {0x0000003f, 0x00070055}, // numpadMultiply
76  {0x00000040, 0x000700e2}, // altLeft
77  {0x00000041, 0x0007002c}, // space
78  {0x00000042, 0x00070039}, // capsLock
79  {0x00000043, 0x0007003a}, // f1
80  {0x00000044, 0x0007003b}, // f2
81  {0x00000045, 0x0007003c}, // f3
82  {0x00000046, 0x0007003d}, // f4
83  {0x00000047, 0x0007003e}, // f5
84  {0x00000048, 0x0007003f}, // f6
85  {0x00000049, 0x00070040}, // f7
86  {0x0000004a, 0x00070041}, // f8
87  {0x0000004b, 0x00070042}, // f9
88  {0x0000004c, 0x00070043}, // f10
89  {0x0000004d, 0x00070053}, // numLock
90  {0x0000004e, 0x00070047}, // scrollLock
91  {0x0000004f, 0x0007005f}, // numpad7
92  {0x00000050, 0x00070060}, // numpad8
93  {0x00000051, 0x00070061}, // numpad9
94  {0x00000052, 0x00070056}, // numpadSubtract
95  {0x00000053, 0x0007005c}, // numpad4
96  {0x00000054, 0x0007005d}, // numpad5
97  {0x00000055, 0x0007005e}, // numpad6
98  {0x00000056, 0x00070057}, // numpadAdd
99  {0x00000057, 0x00070059}, // numpad1
100  {0x00000058, 0x0007005a}, // numpad2
101  {0x00000059, 0x0007005b}, // numpad3
102  {0x0000005a, 0x00070062}, // numpad0
103  {0x0000005b, 0x00070063}, // numpadDecimal
104  {0x0000005d, 0x00070094}, // lang5
105  {0x0000005e, 0x00070064}, // intlBackslash
106  {0x0000005f, 0x00070044}, // f11
107  {0x00000060, 0x00070045}, // f12
108  {0x00000061, 0x00070087}, // intlRo
109  {0x00000062, 0x00070092}, // lang3
110  {0x00000063, 0x00070093}, // lang4
111  {0x00000064, 0x0007008a}, // convert
112  {0x00000065, 0x00070088}, // kanaMode
113  {0x00000066, 0x0007008b}, // nonConvert
114  {0x00000068, 0x00070058}, // numpadEnter
115  {0x00000069, 0x000700e4}, // controlRight
116  {0x0000006a, 0x00070054}, // numpadDivide
117  {0x0000006b, 0x00070046}, // printScreen
118  {0x0000006c, 0x000700e6}, // altRight
119  {0x0000006e, 0x0007004a}, // home
120  {0x0000006f, 0x00070052}, // arrowUp
121  {0x00000070, 0x0007004b}, // pageUp
122  {0x00000071, 0x00070050}, // arrowLeft
123  {0x00000072, 0x0007004f}, // arrowRight
124  {0x00000073, 0x0007004d}, // end
125  {0x00000074, 0x00070051}, // arrowDown
126  {0x00000075, 0x0007004e}, // pageDown
127  {0x00000076, 0x00070049}, // insert
128  {0x00000077, 0x0007004c}, // delete
129  {0x00000079, 0x0007007f}, // audioVolumeMute
130  {0x0000007a, 0x00070081}, // audioVolumeDown
131  {0x0000007b, 0x00070080}, // audioVolumeUp
132  {0x0000007c, 0x00070066}, // power
133  {0x0000007d, 0x00070067}, // numpadEqual
134  {0x0000007e, 0x000700d7}, // numpadSignChange
135  {0x0000007f, 0x00070048}, // pause
136  {0x00000080, 0x000c029f}, // showAllWindows
137  {0x00000081, 0x00070085}, // numpadComma
138  {0x00000082, 0x00070090}, // lang1
139  {0x00000083, 0x00070091}, // lang2
140  {0x00000084, 0x00070089}, // intlYen
141  {0x00000085, 0x000700e3}, // metaLeft
142  {0x00000086, 0x000700e7}, // metaRight
143  {0x00000087, 0x00070065}, // contextMenu
144  {0x00000088, 0x000c0226}, // browserStop
145  {0x00000089, 0x00070079}, // again
146  {0x0000008b, 0x0007007a}, // undo
147  {0x0000008c, 0x00070077}, // select
148  {0x0000008d, 0x0007007c}, // copy
149  {0x0000008e, 0x00070074}, // open
150  {0x0000008f, 0x0007007d}, // paste
151  {0x00000090, 0x0007007e}, // find
152  {0x00000091, 0x0007007b}, // cut
153  {0x00000092, 0x00070075}, // help
154  {0x00000094, 0x000c0192}, // launchApp2
155  {0x00000096, 0x00010082}, // sleep
156  {0x00000097, 0x00010083}, // wakeUp
157  {0x00000098, 0x000c0194}, // launchApp1
158  {0x0000009e, 0x000c0196}, // launchInternetBrowser
159  {0x000000a0, 0x000c019e}, // lockScreen
160  {0x000000a3, 0x000c018a}, // launchMail
161  {0x000000a4, 0x000c022a}, // browserFavorites
162  {0x000000a6, 0x000c0224}, // browserBack
163  {0x000000a7, 0x000c0225}, // browserForward
164  {0x000000a9, 0x000c00b8}, // eject
165  {0x000000ab, 0x000c00b5}, // mediaTrackNext
166  {0x000000ac, 0x000c00cd}, // mediaPlayPause
167  {0x000000ad, 0x000c00b6}, // mediaTrackPrevious
168  {0x000000ae, 0x000c00b7}, // mediaStop
169  {0x000000af, 0x000c00b2}, // mediaRecord
170  {0x000000b0, 0x000c00b4}, // mediaRewind
171  {0x000000b1, 0x000c008c}, // launchPhone
172  {0x000000b3, 0x000c0183}, // mediaSelect
173  {0x000000b4, 0x000c0223}, // browserHome
174  {0x000000b5, 0x000c0227}, // browserRefresh
175  {0x000000b6, 0x000c0094}, // exit
176  {0x000000bb, 0x000700b6}, // numpadParenLeft
177  {0x000000bc, 0x000700b7}, // numpadParenRight
178  {0x000000bd, 0x000c0201}, // newKey
179  {0x000000be, 0x000c0279}, // redo
180  {0x000000bf, 0x00070068}, // f13
181  {0x000000c0, 0x00070069}, // f14
182  {0x000000c1, 0x0007006a}, // f15
183  {0x000000c2, 0x0007006b}, // f16
184  {0x000000c3, 0x0007006c}, // f17
185  {0x000000c4, 0x0007006d}, // f18
186  {0x000000c5, 0x0007006e}, // f19
187  {0x000000c6, 0x0007006f}, // f20
188  {0x000000c7, 0x00070070}, // f21
189  {0x000000c8, 0x00070071}, // f22
190  {0x000000c9, 0x00070072}, // f23
191  {0x000000ca, 0x00070073}, // f24
192  {0x000000d1, 0x000c00b1}, // mediaPause
193  {0x000000d6, 0x000c0203}, // close
194  {0x000000d7, 0x000c00b0}, // mediaPlay
195  {0x000000d8, 0x000c00b3}, // mediaFastForward
196  {0x000000d9, 0x000c00e5}, // bassBoost
197  {0x000000da, 0x000c0208}, // print
198  {0x000000e1, 0x000c0221}, // browserSearch
199  {0x000000e8, 0x000c0070}, // brightnessDown
200  {0x000000e9, 0x000c006f}, // brightnessUp
201  {0x000000eb, 0x000100b5}, // displayToggleIntExt
202  {0x000000ed, 0x000c007a}, // kbdIllumDown
203  {0x000000ee, 0x000c0079}, // kbdIllumUp
204  {0x000000ef, 0x000c028c}, // mailSend
205  {0x000000f0, 0x000c0289}, // mailReply
206  {0x000000f1, 0x000c028b}, // mailForward
207  {0x000000f2, 0x000c0207}, // save
208  {0x000000f3, 0x000c01a7}, // launchDocuments
209  {0x000000fc, 0x000c0075}, // brightnessAuto
210  {0x00000100, 0x00000018}, // microphoneMuteToggle
211  {0x0000016e, 0x000c0060}, // info
212  {0x00000172, 0x000c008d}, // programGuide
213  {0x0000017a, 0x000c0061}, // closedCaptionToggle
214  {0x0000017c, 0x000c0232}, // zoomToggle
215  {0x0000017e, 0x000c01ae}, // launchKeyboardLayout
216  {0x00000190, 0x000c01b7}, // launchAudioBrowser
217  {0x00000195, 0x000c018e}, // launchCalendar
218  {0x0000019d, 0x000c0083}, // mediaLast
219  {0x000001a2, 0x000c009c}, // channelUp
220  {0x000001a3, 0x000c009d}, // channelDown
221  {0x000001aa, 0x000c022d}, // zoomIn
222  {0x000001ab, 0x000c022e}, // zoomOut
223  {0x000001ad, 0x000c0184}, // launchWordProcessor
224  {0x000001af, 0x000c0186}, // launchSpreadsheet
225  {0x000001b5, 0x000c018d}, // launchContacts
226  {0x000001b7, 0x000c0072}, // brightnessToggle
227  {0x000001b8, 0x000c01ab}, // spellCheck
228  {0x000001b9, 0x000c019c}, // logOff
229  {0x0000024b, 0x000c019f}, // launchControlPanel
230  {0x0000024c, 0x000c01a2}, // selectTask
231  {0x0000024d, 0x000c01b1}, // launchScreenSaver
232  {0x0000024e, 0x000c00cf}, // speechInputToggle
233  {0x0000024f, 0x000c01cb}, // launchAssistant
234  {0x00000250, 0x000c029d}, // keyboardLayoutSelect
235  {0x00000258, 0x000c0073}, // brightnessMinimum
236  {0x00000259, 0x000c0074}, // brightnessMaximum
237  {0x00000281, 0x00000017}, // privacyScreenToggle
238 };
239 
240 std::map<uint64_t, uint64_t> gtk_keyval_to_logical_key_map = {
241  {0x000000a5, 0x00200000022}, // yen
242  {0x0000fd06, 0x00100000405}, // 3270_EraseEOF
243  {0x0000fd0e, 0x00100000503}, // 3270_Attn
244  {0x0000fd15, 0x00100000402}, // 3270_Copy
245  {0x0000fd16, 0x00100000d2f}, // 3270_Play
246  {0x0000fd1b, 0x00100000406}, // 3270_ExSelect
247  {0x0000fd1d, 0x00100000608}, // 3270_PrintScreen
248  {0x0000fd1e, 0x0010000000d}, // 3270_Enter
249  {0x0000fe03, 0x00200000105}, // ISO_Level3_Shift
250  {0x0000fe08, 0x00100000709}, // ISO_Next_Group
251  {0x0000fe0a, 0x0010000070a}, // ISO_Prev_Group
252  {0x0000fe0c, 0x00100000707}, // ISO_First_Group
253  {0x0000fe0e, 0x00100000708}, // ISO_Last_Group
254  {0x0000fe20, 0x00100000009}, // ISO_Left_Tab
255  {0x0000fe34, 0x0010000000d}, // ISO_Enter
256  {0x0000ff08, 0x00100000008}, // BackSpace
257  {0x0000ff09, 0x00100000009}, // Tab
258  {0x0000ff0b, 0x00100000401}, // Clear
259  {0x0000ff0d, 0x0010000000d}, // Return
260  {0x0000ff13, 0x00100000509}, // Pause
261  {0x0000ff14, 0x0010000010c}, // Scroll_Lock
262  {0x0000ff1b, 0x0010000001b}, // Escape
263  {0x0000ff21, 0x00100000719}, // Kanji
264  {0x0000ff24, 0x0010000071b}, // Romaji
265  {0x0000ff25, 0x00100000716}, // Hiragana
266  {0x0000ff26, 0x0010000071a}, // Katakana
267  {0x0000ff27, 0x00100000717}, // Hiragana_Katakana
268  {0x0000ff28, 0x0010000071c}, // Zenkaku
269  {0x0000ff29, 0x00100000715}, // Hankaku
270  {0x0000ff2a, 0x0010000071d}, // Zenkaku_Hankaku
271  {0x0000ff2f, 0x00100000714}, // Eisu_Shift
272  {0x0000ff31, 0x00100000711}, // Hangul
273  {0x0000ff34, 0x00100000712}, // Hangul_Hanja
274  {0x0000ff37, 0x00100000703}, // Codeinput
275  {0x0000ff3c, 0x00100000710}, // SingleCandidate
276  {0x0000ff3e, 0x0010000070e}, // PreviousCandidate
277  {0x0000ff50, 0x00100000306}, // Home
278  {0x0000ff51, 0x00100000302}, // Left
279  {0x0000ff52, 0x00100000304}, // Up
280  {0x0000ff53, 0x00100000303}, // Right
281  {0x0000ff54, 0x00100000301}, // Down
282  {0x0000ff55, 0x00100000308}, // Page_Up
283  {0x0000ff56, 0x00100000307}, // Page_Down
284  {0x0000ff57, 0x00100000305}, // End
285  {0x0000ff60, 0x0010000050c}, // Select
286  {0x0000ff61, 0x00100000a0c}, // Print
287  {0x0000ff62, 0x00100000506}, // Execute
288  {0x0000ff63, 0x00100000407}, // Insert
289  {0x0000ff65, 0x0010000040a}, // Undo
290  {0x0000ff66, 0x00100000409}, // Redo
291  {0x0000ff67, 0x00100000505}, // Menu
292  {0x0000ff68, 0x00100000507}, // Find
293  {0x0000ff69, 0x00100000504}, // Cancel
294  {0x0000ff6a, 0x00100000508}, // Help
295  {0x0000ff7e, 0x0010000070b}, // Mode_switch
296  {0x0000ff7f, 0x0010000010a}, // Num_Lock
297  {0x0000ff80, 0x00000000020}, // KP_Space
298  {0x0000ff89, 0x00100000009}, // KP_Tab
299  {0x0000ff8d, 0x0020000020d}, // KP_Enter
300  {0x0000ff91, 0x00100000801}, // KP_F1
301  {0x0000ff92, 0x00100000802}, // KP_F2
302  {0x0000ff93, 0x00100000803}, // KP_F3
303  {0x0000ff94, 0x00100000804}, // KP_F4
304  {0x0000ff95, 0x00200000237}, // KP_Home
305  {0x0000ff96, 0x00200000234}, // KP_Left
306  {0x0000ff97, 0x00200000238}, // KP_Up
307  {0x0000ff98, 0x00200000236}, // KP_Right
308  {0x0000ff99, 0x00200000232}, // KP_Down
309  {0x0000ff9a, 0x00200000239}, // KP_Page_Up
310  {0x0000ff9b, 0x00200000233}, // KP_Page_Down
311  {0x0000ff9c, 0x00200000231}, // KP_End
312  {0x0000ff9e, 0x00200000230}, // KP_Insert
313  {0x0000ff9f, 0x0020000022e}, // KP_Delete
314  {0x0000ffaa, 0x0020000022a}, // KP_Multiply
315  {0x0000ffab, 0x0020000022b}, // KP_Add
316  {0x0000ffad, 0x0020000022d}, // KP_Subtract
317  {0x0000ffae, 0x0000000002e}, // KP_Decimal
318  {0x0000ffaf, 0x0020000022f}, // KP_Divide
319  {0x0000ffb0, 0x00200000230}, // KP_0
320  {0x0000ffb1, 0x00200000231}, // KP_1
321  {0x0000ffb2, 0x00200000232}, // KP_2
322  {0x0000ffb3, 0x00200000233}, // KP_3
323  {0x0000ffb4, 0x00200000234}, // KP_4
324  {0x0000ffb5, 0x00200000235}, // KP_5
325  {0x0000ffb6, 0x00200000236}, // KP_6
326  {0x0000ffb7, 0x00200000237}, // KP_7
327  {0x0000ffb8, 0x00200000238}, // KP_8
328  {0x0000ffb9, 0x00200000239}, // KP_9
329  {0x0000ffbd, 0x0020000023d}, // KP_Equal
330  {0x0000ffbe, 0x00100000801}, // F1
331  {0x0000ffbf, 0x00100000802}, // F2
332  {0x0000ffc0, 0x00100000803}, // F3
333  {0x0000ffc1, 0x00100000804}, // F4
334  {0x0000ffc2, 0x00100000805}, // F5
335  {0x0000ffc3, 0x00100000806}, // F6
336  {0x0000ffc4, 0x00100000807}, // F7
337  {0x0000ffc5, 0x00100000808}, // F8
338  {0x0000ffc6, 0x00100000809}, // F9
339  {0x0000ffc7, 0x0010000080a}, // F10
340  {0x0000ffc8, 0x0010000080b}, // F11
341  {0x0000ffc9, 0x0010000080c}, // F12
342  {0x0000ffca, 0x0010000080d}, // F13
343  {0x0000ffcb, 0x0010000080e}, // F14
344  {0x0000ffcc, 0x0010000080f}, // F15
345  {0x0000ffcd, 0x00100000810}, // F16
346  {0x0000ffce, 0x00100000811}, // F17
347  {0x0000ffcf, 0x00100000812}, // F18
348  {0x0000ffd0, 0x00100000813}, // F19
349  {0x0000ffd1, 0x00100000814}, // F20
350  {0x0000ffd2, 0x00100000815}, // F21
351  {0x0000ffd3, 0x00100000816}, // F22
352  {0x0000ffd4, 0x00100000817}, // F23
353  {0x0000ffd5, 0x00100000818}, // F24
354  {0x0000ffe1, 0x00200000102}, // Shift_L
355  {0x0000ffe2, 0x00200000103}, // Shift_R
356  {0x0000ffe3, 0x00200000100}, // Control_L
357  {0x0000ffe4, 0x00200000101}, // Control_R
358  {0x0000ffe5, 0x00100000104}, // Caps_Lock
359  {0x0000ffe7, 0x00200000106}, // Meta_L
360  {0x0000ffe8, 0x00200000107}, // Meta_R
361  {0x0000ffe9, 0x00200000104}, // Alt_L
362  {0x0000ffea, 0x00200000105}, // Alt_R
363  {0x0000ffeb, 0x0010000010e}, // Super_L
364  {0x0000ffec, 0x0010000010e}, // Super_R
365  {0x0000ffed, 0x00100000108}, // Hyper_L
366  {0x0000ffee, 0x00100000108}, // Hyper_R
367  {0x0000ffff, 0x0010000007f}, // Delete
368  {0x1008ff02, 0x00100000602}, // MonBrightnessUp
369  {0x1008ff03, 0x00100000601}, // MonBrightnessDown
370  {0x1008ff10, 0x0010000060a}, // Standby
371  {0x1008ff11, 0x00100000a0f}, // AudioLowerVolume
372  {0x1008ff12, 0x00100000a11}, // AudioMute
373  {0x1008ff13, 0x00100000a10}, // AudioRaiseVolume
374  {0x1008ff14, 0x00100000d2f}, // AudioPlay
375  {0x1008ff15, 0x00100000a07}, // AudioStop
376  {0x1008ff16, 0x00100000a09}, // AudioPrev
377  {0x1008ff17, 0x00100000a08}, // AudioNext
378  {0x1008ff18, 0x00100000c04}, // HomePage
379  {0x1008ff19, 0x00100000b03}, // Mail
380  {0x1008ff1b, 0x00100000c06}, // Search
381  {0x1008ff1c, 0x00100000d30}, // AudioRecord
382  {0x1008ff20, 0x00100000b02}, // Calendar
383  {0x1008ff26, 0x00100000c01}, // Back
384  {0x1008ff27, 0x00100000c03}, // Forward
385  {0x1008ff28, 0x00100000c07}, // Stop
386  {0x1008ff29, 0x00100000c05}, // Refresh
387  {0x1008ff2a, 0x00100000607}, // PowerOff
388  {0x1008ff2b, 0x0010000060b}, // WakeUp
389  {0x1008ff2c, 0x00100000604}, // Eject
390  {0x1008ff2d, 0x00100000b07}, // ScreenSaver
391  {0x1008ff2f, 0x00200000002}, // Sleep
392  {0x1008ff30, 0x00100000c02}, // Favorites
393  {0x1008ff31, 0x00100000d2e}, // AudioPause
394  {0x1008ff3e, 0x00100000d31}, // AudioRewind
395  {0x1008ff56, 0x00100000a01}, // Close
396  {0x1008ff57, 0x00100000402}, // Copy
397  {0x1008ff58, 0x00100000404}, // Cut
398  {0x1008ff61, 0x00100000605}, // LogOff
399  {0x1008ff68, 0x00100000a0a}, // New
400  {0x1008ff6b, 0x00100000a0b}, // Open
401  {0x1008ff6d, 0x00100000408}, // Paste
402  {0x1008ff6e, 0x00100000b0d}, // Phone
403  {0x1008ff72, 0x00100000a03}, // Reply
404  {0x1008ff77, 0x00100000a0d}, // Save
405  {0x1008ff7b, 0x00100000a04}, // Send
406  {0x1008ff7c, 0x00100000a0e}, // Spell
407  {0x1008ff8b, 0x0010000050d}, // ZoomIn
408  {0x1008ff8c, 0x0010000050e}, // ZoomOut
409  {0x1008ff90, 0x00100000a02}, // MailForward
410  {0x1008ff97, 0x00100000d2c}, // AudioForward
411  {0x1008ffa7, 0x00200000000}, // Suspend
412 };
413 
416 
417  data = g_new(FlKeyEmbedderCheckedKey, 1);
418  g_hash_table_insert(table, GUINT_TO_POINTER(GDK_SHIFT_MASK), data);
419  data->is_caps_lock = false;
420  data->primary_physical_key = 0x0000700e1; // shiftLeft
421  data->primary_logical_key = 0x00200000102; // shiftLeft
422  data->secondary_logical_key = 0x00200000103; // shiftRight
423 
424  data = g_new(FlKeyEmbedderCheckedKey, 1);
425  g_hash_table_insert(table, GUINT_TO_POINTER(GDK_CONTROL_MASK), data);
426  data->is_caps_lock = false;
427  data->primary_physical_key = 0x0000700e0; // controlLeft
428  data->primary_logical_key = 0x00200000100; // controlLeft
429  data->secondary_logical_key = 0x00200000101; // controlRight
430 
431  data = g_new(FlKeyEmbedderCheckedKey, 1);
432  g_hash_table_insert(table, GUINT_TO_POINTER(GDK_MOD1_MASK), data);
433  data->is_caps_lock = false;
434  data->primary_physical_key = 0x0000700e2; // altLeft
435  data->primary_logical_key = 0x00200000104; // altLeft
436  data->secondary_logical_key = 0x00200000105; // altRight
437 
438  data = g_new(FlKeyEmbedderCheckedKey, 1);
439  g_hash_table_insert(table, GUINT_TO_POINTER(GDK_META_MASK), data);
440  data->is_caps_lock = false;
441  data->primary_physical_key = 0x0000700e3; // metaLeft
442  data->primary_logical_key = 0x00200000106; // metaLeft
443  data->secondary_logical_key = 0x00200000107; // metaRight
444 }
445 
446 void initialize_lock_bit_to_checked_keys(GHashTable* table) {
448 
449  data = g_new(FlKeyEmbedderCheckedKey, 1);
450  g_hash_table_insert(table, GUINT_TO_POINTER(GDK_LOCK_MASK), data);
451  data->is_caps_lock = true;
452  data->primary_physical_key = 0x000070039; // capsLock
453  data->primary_logical_key = 0x00100000104; // capsLock
454 
455  data = g_new(FlKeyEmbedderCheckedKey, 1);
456  g_hash_table_insert(table, GUINT_TO_POINTER(GDK_MOD2_MASK), data);
457  data->is_caps_lock = false;
458  data->primary_physical_key = 0x000070053; // numLock
459  data->primary_logical_key = 0x0010000010a; // numLock
460 }
461 
462 const std::vector<LayoutGoal> layout_goals = {
463  LayoutGoal{0x41, 0x20, false}, // Space
464  LayoutGoal{0x30, 0x22, false}, // Quote
465  LayoutGoal{0x3b, 0x2c, false}, // Comma
466  LayoutGoal{0x14, 0x2d, false}, // Minus
467  LayoutGoal{0x3c, 0x2e, false}, // Period
468  LayoutGoal{0x3d, 0x2f, false}, // Slash
469  LayoutGoal{0x13, 0x30, true}, // Digit0
470  LayoutGoal{0x0a, 0x31, true}, // Digit1
471  LayoutGoal{0x0b, 0x32, true}, // Digit2
472  LayoutGoal{0x0c, 0x33, true}, // Digit3
473  LayoutGoal{0x0d, 0x34, true}, // Digit4
474  LayoutGoal{0x0e, 0x35, true}, // Digit5
475  LayoutGoal{0x0f, 0x36, true}, // Digit6
476  LayoutGoal{0x10, 0x37, true}, // Digit7
477  LayoutGoal{0x11, 0x38, true}, // Digit8
478  LayoutGoal{0x12, 0x39, true}, // Digit9
479  LayoutGoal{0x2f, 0x3b, false}, // Semicolon
480  LayoutGoal{0x15, 0x3d, false}, // Equal
481  LayoutGoal{0x22, 0x5b, false}, // BracketLeft
482  LayoutGoal{0x33, 0x5c, false}, // Backslash
483  LayoutGoal{0x23, 0x5d, false}, // BracketRight
484  LayoutGoal{0x31, 0x60, false}, // Backquote
485  LayoutGoal{0x26, 0x61, true}, // KeyA
486  LayoutGoal{0x38, 0x62, true}, // KeyB
487  LayoutGoal{0x36, 0x63, true}, // KeyC
488  LayoutGoal{0x28, 0x64, true}, // KeyD
489  LayoutGoal{0x1a, 0x65, true}, // KeyE
490  LayoutGoal{0x29, 0x66, true}, // KeyF
491  LayoutGoal{0x2a, 0x67, true}, // KeyG
492  LayoutGoal{0x2b, 0x68, true}, // KeyH
493  LayoutGoal{0x1f, 0x69, true}, // KeyI
494  LayoutGoal{0x2c, 0x6a, true}, // KeyJ
495  LayoutGoal{0x2d, 0x6b, true}, // KeyK
496  LayoutGoal{0x2e, 0x6c, true}, // KeyL
497  LayoutGoal{0x3a, 0x6d, true}, // KeyM
498  LayoutGoal{0x39, 0x6e, true}, // KeyN
499  LayoutGoal{0x20, 0x6f, true}, // KeyO
500  LayoutGoal{0x21, 0x70, true}, // KeyP
501  LayoutGoal{0x18, 0x71, true}, // KeyQ
502  LayoutGoal{0x1b, 0x72, true}, // KeyR
503  LayoutGoal{0x27, 0x73, true}, // KeyS
504  LayoutGoal{0x1c, 0x74, true}, // KeyT
505  LayoutGoal{0x1e, 0x75, true}, // KeyU
506  LayoutGoal{0x37, 0x76, true}, // KeyV
507  LayoutGoal{0x19, 0x77, true}, // KeyW
508  LayoutGoal{0x35, 0x78, true}, // KeyX
509  LayoutGoal{0x1d, 0x79, true}, // KeyY
510  LayoutGoal{0x34, 0x7a, true}, // KeyZ
511  LayoutGoal{0x5e, 0x200000020, false}, // IntlBackslash
512 };
513 
514 const uint64_t kValueMask = 0x000ffffffff;
515 const uint64_t kUnicodePlane = 0x00000000000;
516 const uint64_t kGtkPlane = 0x01500000000;
gtk_keyval_to_logical_key_map
std::map< uint64_t, uint64_t > gtk_keyval_to_logical_key_map
Definition: key_mapping.g.cc:240
layout_goals
const std::vector< LayoutGoal > layout_goals
Definition: key_mapping.g.cc:462
FlKeyEmbedderCheckedKey::is_caps_lock
bool is_caps_lock
Definition: fl_key_embedder_responder_private.h:43
LayoutGoal
Definition: key_mapping.h:40
kUnicodePlane
const uint64_t kUnicodePlane
Definition: key_mapping.g.cc:515
initialize_modifier_bit_to_checked_keys
void initialize_modifier_bit_to_checked_keys(GHashTable *table)
Definition: key_mapping.g.cc:414
kGtkPlane
const uint64_t kGtkPlane
Definition: key_mapping.g.cc:516
kValueMask
const uint64_t kValueMask
Definition: key_mapping.g.cc:514
key_mapping.h
initialize_lock_bit_to_checked_keys
void initialize_lock_bit_to_checked_keys(GHashTable *table)
Definition: key_mapping.g.cc:446
fl_key_embedder_responder_private.h
FlKeyEmbedderCheckedKey::primary_physical_key
uint64_t primary_physical_key
Definition: fl_key_embedder_responder_private.h:36
FlKeyEmbedderCheckedKey::secondary_logical_key
uint64_t secondary_logical_key
Definition: fl_key_embedder_responder_private.h:40
xkb_to_physical_key_map
std::map< uint64_t, uint64_t > xkb_to_physical_key_map
Definition: key_mapping.g.cc:20
FlKeyEmbedderCheckedKey::primary_logical_key
uint64_t primary_logical_key
Definition: fl_key_embedder_responder_private.h:38
FlKeyEmbedderCheckedKey
Definition: fl_key_embedder_responder_private.h:34