| Flutter Linux Embedder |

Classes | Functions | Variables
key_mapping.h File Reference
`#include <gdk/gdk.h>`
`#include <cinttypes>`
`#include <map>`
`#include <vector>`

Go to the source code of this file.

## Classes
struct | LayoutGoal

## Functions
uint64_t | gpointer_to_uint64 (gpointer pointer)
gpointer | uint64_to_gpointer (uint64_t number)
void | initialize_modifier_bit_to_checked_keys (GHashTable *table)
void | initialize_lock_bit_to_checked_keys (GHashTable *table)

## Variables
std::map< uint64_t, uint64_t > | xkb_to_physical_key_map
std::map< uint64_t, uint64_t > | gtk_keyval_to_logical_key_map
const uint64_t | kValueMask
const uint64_t | kUnicodePlane
const uint64_t | kGtkPlane
const std::vector< LayoutGoal > | layout_goals

## Function Documentation

## ◆ gpointer_to_uint64()

uint64_t gpointer_to_uint64 | ( | gpointer | pointer | ) |
| inline

Definition at line 13 of file key_mapping.h.

13 {
14 return pointer == nullptr ? 0 : reinterpret_cast<uint64_t>(pointer);
15 }

Referenced by hash_table_find_equal_value(), lookup_hash_table(), and reverse_lookup_hash_table().

## ◆ initialize_lock_bit_to_checked_keys()

void initialize_lock_bit_to_checked_keys | ( | GHashTable * | table | ) |

Definition at line 446 of file key_mapping.g.cc.

446 {
447 FlKeyEmbedderCheckedKey* data;
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 }

References FlKeyEmbedderCheckedKey::is_caps_lock, FlKeyEmbedderCheckedKey::primary_logical_key, and FlKeyEmbedderCheckedKey::primary_physical_key.

Referenced by fl_key_embedder_responder_new().

## ◆ initialize_modifier_bit_to_checked_keys()

void initialize_modifier_bit_to_checked_keys | ( | GHashTable * | table | ) |

Definition at line 414 of file key_mapping.g.cc.

414 {
415 FlKeyEmbedderCheckedKey* data;
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 }

References FlKeyEmbedderCheckedKey::is_caps_lock, FlKeyEmbedderCheckedKey::primary_logical_key, FlKeyEmbedderCheckedKey::primary_physical_key, and FlKeyEmbedderCheckedKey::secondary_logical_key.

Referenced by fl_key_embedder_responder_new().

## ◆ uint64_to_gpointer()

gpointer uint64_to_gpointer | ( | uint64_t | number | ) |
| inline

Definition at line 17 of file key_mapping.h.

17 {
18 return reinterpret_cast<gpointer>(number);
19 }

Referenced by initialize_logical_key_to_lock_bit_loop_body(), lookup_hash_table(), possibly_update_lock_bit(), reverse_lookup_hash_table(), update_mapping_record(), and update_pressing_state().

## Variable Documentation

## ◆ gtk_keyval_to_logical_key_map

std::map<uint64_t, uint64_t> gtk_keyval_to_logical_key_map

Definition at line 240 of file key_mapping.g.cc.

Referenced by event_to_logical_key().

## ◆ kGtkPlane

const uint64_t kGtkPlane

Definition at line 516 of file key_mapping.g.cc.

Referenced by event_to_logical_key(), and event_to_physical_key().

## ◆ kUnicodePlane

const uint64_t kUnicodePlane

Definition at line 515 of file key_mapping.g.cc.

Referenced by event_to_logical_key().

## ◆ kValueMask

const uint64_t kValueMask

Definition at line 514 of file key_mapping.g.cc.

Referenced by apply_id_plane().

## ◆ layout_goals

const std::vector<LayoutGoal> layout_goals

Definition at line 462 of file key_mapping.g.cc.

Referenced by fl_keyboard_manager_init(), guarantee_layout(), and TEST().

## ◆ xkb_to_physical_key_map

std::map<uint64_t, uint64_t> xkb_to_physical_key_map

Definition at line 20 of file key_mapping.g.cc.

Referenced by event_to_physical_key().

FlKeyEmbedderCheckedKey::is_caps_lock
bool is_caps_lock
Definition: fl_key_embedder_responder_private.h:43
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
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