flutter/dev/tools/gen_keycodes/data/gtk_key_mapping_cc.tmpl
Tong Mu 9956a35a5a
Hardware keyboard: codegen (#73440)
Rewrites tools/gen_keycodes, the script that generates key mappings across the framework and the engine.
2021-04-30 21:06:03 -07:00

45 lines
1.4 KiB
Cheetah

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "key_mapping.h"
#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
// be edited directly.
//
// Edit the template dev/tools/gen_keycodes/data/gtk_key_mapping_cc.tmpl
// instead. See dev/tools/gen_keycodes/README.md for more information.
// Insert a new entry into a hashtable from uint64 to uint64.
//
// Returns whether the newly added value was already in the hash table or not.
static bool insert_record(GHashTable* table, guint64 xkb, guint64 fl_key) {
return g_hash_table_insert(table, uint64_to_gpointer(xkb),
uint64_to_gpointer(fl_key));
}
void initialize_xkb_to_physical_key(GHashTable* table) {
@@@XKB_SCAN_CODE_MAP@@@
}
void initialize_gtk_keyval_to_logical_key(GHashTable* table) {
@@@GTK_KEYVAL_CODE_MAP@@@
}
void initialize_modifier_bit_to_checked_keys(GHashTable* table) {
FlKeyEmbedderCheckedKey* data;
@@@GTK_MODIFIER_BIT_MAP@@@
}
void initialize_lock_bit_to_checked_keys(GHashTable* table) {
FlKeyEmbedderCheckedKey* data;
@@@GTK_MODE_BIT_MAP@@@
}