GaZaTu / im-emoji-picker

emoji picker compatible with Linux systems using either XServer or Wayland with either Fcitx5 or IBus
MIT License
45 stars 3 forks source link

Misc fcitx5 fix #5

Closed wengxt closed 1 year ago

wengxt commented 1 year ago
  1. fcitx::Key returned from keyEvent.key() is "normalized". The shift modifier is usually removed for simplicity to have uniformed key for different layout. If the keysym is a symbol, simply remove "shift" will also work.
  2. WAYLAND_SOCKET may be unset by the qt thread. using an optional dependency (this ensures the loading order) on wayland to avoid it prevent waylandim from working.
  3. Dependency on core is not required. core means the core library. It's only useful if you require a certain version of fcitx (e.g. core:5.0.10) to avoid lower version of fcitx accidentally load an incompatible addon.
GaZaTu commented 1 year ago
  1. fcitx::Key returned from keyEvent.key()...

oh didn't know this, but then again, my code to convert a fcitx::KeyEvent to a QKeyEvent is cursed xd

  1. WAYLAND_SOCKET may be unset by the qt thread...

now i understand what you meant by "this doesn't work on wayland". I never actually tried a setup with fcitx5 running at startup and setting /etc/environment and stuff so i always directly set the env before starting my test app which apparently circumvents this problem.

wengxt commented 1 year ago

@GaZaTu you can use keyEvent.rawKey for this.

https://codedocs.xyz/fcitx/fcitx5/classfcitx_1_1KeyEventBase.html#a5d8c3cc4c81764f8f5637f94e22fd68b