2121#include " types.hpp"
2222#include " virtual_keyboard.hpp"
2323
24- QS_LOGGING_CATEGORY (inputMethodKeyboardKeys, " quickshell.wayland.inputMethod.keyboardKeys" , QtWarningMsg);
24+ QS_LOGGING_CATEGORY (
25+ inputMethodKeyboardKeys,
26+ " quickshell.wayland.inputMethod.keyboardKeys" ,
27+ QtWarningMsg
28+ );
2529
2630namespace qs ::wayland::input_method::impl {
2731
@@ -31,7 +35,7 @@ InputMethodKeyboardGrab::InputMethodKeyboardGrab(
3135)
3236 : QObject(parent)
3337 , zwp_input_method_keyboard_grab_v2(keyboard) {
34- this ->mRepeatTimer .callOnTimeout (this , [this ](){
38+ this ->mRepeatTimer .callOnTimeout (this , [this ]() {
3539 this ->mRepeatTimer .setInterval (1000 / this ->mRepeatRate );
3640 this ->handleKey (this ->mRepeatKey );
3741 });
@@ -94,9 +98,10 @@ void InputMethodKeyboardGrab::zwp_input_method_keyboard_grab_v2_key(
9498
9599 key += WAYLAND_KEY_OFFSET;
96100
97- qCInfo (inputMethodKeyboardKeys) << KeyMapState::keyStateName (static_cast <wl_keyboard_key_state>(state))
98- << this ->mKeyMapState .keyName (key) << " [" << key << " ]"
99- << this ->mKeyMapState .getChar (key);
101+ qCInfo (inputMethodKeyboardKeys) << KeyMapState::keyStateName (
102+ static_cast <wl_keyboard_key_state>(state)
103+ ) << this ->mKeyMapState .keyName (key)
104+ << " [" << key << " ]" << this ->mKeyMapState .getChar (key);
100105
101106 const xkb_keysym_t sym = this ->mKeyMapState .getOneSym (key);
102107
@@ -118,7 +123,7 @@ void InputMethodKeyboardGrab::zwp_input_method_keyboard_grab_v2_key(
118123
119124 if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
120125 const bool keyHandled = this ->handleKey (key);
121- if (keyHandled){
126+ if (keyHandled) {
122127 if (this ->mKeyMapState .keyRepeats (key) && this ->mRepeatRate > 0 ) {
123128 this ->mRepeatKey = key;
124129 this ->mRepeatTimer .setInterval (this ->mRepeatDelay );
@@ -135,7 +140,7 @@ void InputMethodKeyboardGrab::zwp_input_method_keyboard_grab_v2_key(
135140 this ->mVirturalKeyboard ->sendKey (key, static_cast <wl_keyboard_key_state>(state));
136141}
137142
138- bool InputMethodKeyboardGrab::handleKey (xkb_keycode_t key){
143+ bool InputMethodKeyboardGrab::handleKey (xkb_keycode_t key) {
139144 const xkb_keysym_t sym = this ->mKeyMapState .getOneSym (key);
140145 if (sym == XKB_KEY_Up) {
141146 emit this ->directionPress (DirectionKey::Up);
0 commit comments