Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
32203c39
Unverified
Commit
32203c39
authored
Jun 17, 2021
by
Tong Mu
Committed by
GitHub
Jun 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Key codegen for Hardware Keyboard: Linux (GTK) #82962
parent
c6cd8a60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
gtk_key_mapping_cc.tmpl
dev/tools/gen_keycodes/data/gtk_key_mapping_cc.tmpl
+4
-6
gtk_code_gen.dart
dev/tools/gen_keycodes/lib/gtk_code_gen.dart
+4
-2
No files found.
dev/tools/gen_keycodes/data/gtk_key_mapping_cc.tmpl
View file @
32203c39
...
...
@@ -7,8 +7,6 @@
#include <glib.h>
#include <map>
#include "flutter/shell/platform/linux/fl_key_embedder_responder_private.h"
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by
// flutter/flutter@dev/tools/gen_keycodes/bin/gen_keycodes.dart and should not
...
...
@@ -25,13 +23,13 @@ static bool insert_record(GHashTable* table, guint64 xkb, guint64 fl_key) {
uint64_to_gpointer(fl_key));
}
void initialize_xkb_to_physical_key(GHashTable* table)
{
std::map<uint64_t, uint64_t> xkb_to_physical_key_map =
{
@@@XKB_SCAN_CODE_MAP@@@
}
}
;
void initialize_gtk_keyval_to_logical_key(GHashTable* table)
{
std::map<uint64_t, uint64_t> gtk_keyval_to_logical_key_map =
{
@@@GTK_KEYVAL_CODE_MAP@@@
}
}
;
void initialize_modifier_bit_to_checked_keys(GHashTable* table) {
FlKeyEmbedderCheckedKey* data;
...
...
dev/tools/gen_keycodes/lib/gtk_code_gen.dart
View file @
32203c39
...
...
@@ -27,7 +27,8 @@ class GtkCodeGenerator extends PlatformCodeGenerator {
final
OutputLines
<
int
>
lines
=
OutputLines
<
int
>(
'GTK scancode map'
);
for
(
final
PhysicalKeyEntry
entry
in
keyData
.
entries
)
{
if
(
entry
.
xKbScanCode
!=
null
)
{
lines
.
add
(
entry
.
xKbScanCode
!,
' insert_record(table,
${toHex(entry.xKbScanCode)}
,
${toHex(entry.usbHidCode)}
); //
${entry.constantName}
'
);
lines
.
add
(
entry
.
xKbScanCode
!,
' {
${toHex(entry.xKbScanCode)}
,
${toHex(entry.usbHidCode)}
}, //
${entry.constantName}
'
);
}
}
return
lines
.
sortedJoin
().
trimRight
();
...
...
@@ -38,7 +39,8 @@ class GtkCodeGenerator extends PlatformCodeGenerator {
final
OutputLines
<
int
>
lines
=
OutputLines
<
int
>(
'GTK keyval map'
);
for
(
final
LogicalKeyEntry
entry
in
logicalData
.
entries
)
{
zipStrict
(
entry
.
gtkValues
,
entry
.
gtkNames
,
(
int
value
,
String
name
)
{
lines
.
add
(
value
,
' insert_record(table,
${toHex(value)}
,
${toHex(entry.value, digits: 11)}
); //
$name
'
);
lines
.
add
(
value
,
' {
${toHex(value)}
,
${toHex(entry.value, digits: 11)}
}, //
$name
'
);
});
}
return
lines
.
sortedJoin
().
trimRight
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment