Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-10-07 07:53:46 +0300
committerCampbell Barton <campbell@blender.org>2022-10-07 07:53:46 +0300
commita0af1e3971ce7e95d9d1c0cd9d239e7826452965 (patch)
tree5754bef432100e2ea5f8ce48fa65d08cefe8f939 /intern
parentcafd204af6d9969654bdee5ae14fef220640487c (diff)
GHOST/Wayland: improve logging messages for keyboard events
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 48401abd6b6..d569d24926d 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -2303,6 +2303,7 @@ static void keyboard_handle_enter(void *data,
uint32_t *key;
WL_ARRAY_FOR_EACH (key, keys) {
const xkb_keycode_t key_code = *key + EVDEV_OFFSET;
+ CLOG_INFO(LOG, 2, "enter (key_held=%d)", int(key_code));
const xkb_keysym_t sym = xkb_state_key_get_one_sym(seat->xkb_state, key_code);
const GHOST_TKey gkey = xkb_map_gkey_or_scan_code(sym, *key);
if (gkey != GHOST_kKeyUnknown) {
@@ -2407,10 +2408,10 @@ static void keyboard_handle_key(void *data,
const xkb_keysym_t sym = xkb_state_key_get_one_sym_without_modifiers(
seat->xkb_state_empty, seat->xkb_state_empty_with_numlock, key_code);
if (sym == XKB_KEY_NoSymbol) {
- CLOG_INFO(LOG, 2, "key (no symbol, skipped)");
+ CLOG_INFO(LOG, 2, "key (code=%d, state=%u, no symbol, skipped)", int(key_code), state);
return;
}
- CLOG_INFO(LOG, 2, "key");
+ CLOG_INFO(LOG, 2, "key (code=%d, state=%u)", int(key_code), state);
GHOST_TEventType etype = GHOST_kEventUnknown;
switch (state) {
@@ -3179,7 +3180,7 @@ GHOST_TSuccess GHOST_SystemWayland::getModifierKeys(GHOST_ModifierKeys &keys) co
if (val) {
if (UNLIKELY(!(val_l || val_r))) {
CLOG_WARN(&LOG_WL_KEYBOARD_DEPRESSED_STATE,
- "modifier (%s) state is inconsistent (held keys do not match XKB)",
+ "modifier (%s) state is inconsistent (GHOST held keys do not match XKB)",
mod_info.display_name);
/* Picking the left is arbitrary. */
val_l = true;
@@ -3188,7 +3189,7 @@ GHOST_TSuccess GHOST_SystemWayland::getModifierKeys(GHOST_ModifierKeys &keys) co
else {
if (UNLIKELY(val_l || val_r)) {
CLOG_WARN(&LOG_WL_KEYBOARD_DEPRESSED_STATE,
- "modifier (%s) state is inconsistent (released keys do not match XKB)",
+ "modifier (%s) state is inconsistent (GHOST released keys do not match XKB)",
mod_info.display_name);
val_l = false;
val_r = false;