Skip to content

Bug: telegram-desktop (qt6) on archlinux does not work with unicode action #1703

@sekuba

Description

@sekuba

Requirements

Describe the bug

I am using the vanilla telegram-desktop package on archlinux. It is the only app so far that does not seem to work with kanata. Weirdly, instead of outputting ö, i get f6 and it is immediately sent (so probably the output includes a return.

each mapping yields a different message on telegram, like e4, fc and so on instead of the umlaut i would expect.

my config is quite simple, it's just the umlauts using altGr

Relevant kanata config

(defcfg
  process-unmapped-keys yes
  sequence-timeout 2000
)

(defsrc
  a    o    u    s
  ralt
)

(deflayer base
  _    _    _    _
  sldr  ;; sequence leader
)

(defseq
  ä (a)
  ö (o)
  ü (u)
  Ä (S-a)
  Ö (S-o)
  Ü (S-u)
  ß (s)
  ẞ (S-s)
)

(defvirtualkeys
  ä (unicode ä)
  ö (unicode ö)
  ü (unicode ü)
  Ä (unicode Ä)
  Ö (unicode Ö)
  Ü (unicode Ü)
  ß (unicode ß)
  ẞ (unicode ẞ)
)

To Reproduce

  1. install latest telegram-desktop package on arch with wayland
  2. use my kanata config
  3. use any of the remapped keys

Expected behavior

ralt + o: ö

Kanata version

1.9.0

Debug logs

here is me pressing ralt + o (should output ö but outputted f6 and return

➜  ~ sudo kanata --debug -c /home/sekuba/.config/kanata/kanata.kbd
19:25:27.5298 [INFO] kanata v1.9.0 starting
19:25:27.5300 [INFO] process unmapped keys: true
19:25:27.5301 [INFO] NOTE: kanata was compiled to never allow cmd
19:25:27.5301 [DEBUG] (1) kanata_parser::cfg::alloc: freeing allocations of length 0
19:25:27.5302 [INFO] config file is valid
19:25:27.5306 [INFO] Created device "/dev/input/event14"
19:25:27.5307 [DEBUG] (1) kanata_state_machine::kanata::output_logic::zippychord: zchd reset state
19:25:27.5307 [DEBUG] (1) kanata_state_machine::kanata::output_logic::zippychord: zchd soft reset state
19:25:27.5307 [DEBUG] (1) kanata_state_machine::kanata::output_logic::zippychord: zchd clear historical data
19:25:27.5307 [INFO] Sleeping for 2s. Please release all keys and don't press additional ones. Run kanata with --help to see how understand more and how to disable this sleep.
19:25:29.5309 [INFO] entering the processing loop
19:25:29.5311 [INFO] entering the event loop
19:25:29.5311 [INFO] looking for devices in /dev/input
19:25:29.5312 [INFO] Init: catching only releases and sending immediately
19:25:29.5532 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: HD-Audio Generic Headphone
19:25:29.5751 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: HD-Audio Generic HDMI/DP,pcm=9
19:25:29.6062 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: HD-Audio Generic HDMI/DP,pcm=8
19:25:29.6371 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: HD-Audio Generic HDMI/DP,pcm=7
19:25:29.6511 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: HD-Audio Generic HDMI/DP,pcm=3
19:25:29.6721 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: PIXA3854:00 093A:0274 Touchpad
19:25:29.6801 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. detect type KeyboardMice; device type Mouse, device name: PIXA3854:00 093A:0274 Mouse
19:25:29.6921 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: true. detect type KeyboardMice; device type Keyboard, device name: FRMW0004:00 32AC:0006 Consumer Control
19:25:29.6922 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: FRMW0004:00 32AC:0006 Wireless Radio Control
19:25:29.7041 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: PC Speaker
19:25:29.7281 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: Video Bus
19:25:29.7361 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: true. detect type KeyboardMice; device type Keyboard, device name: AT Translated Set 2 keyboard
19:25:29.7362 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: Power Button
19:25:29.7471 [DEBUG] (1) kanata_state_machine::oskbd::linux: Use for input autodetect: false. Non-input device: Lid Switch
19:25:29.7552 [INFO] registering /dev/input/event6: "FRMW0004:00 32AC:0006 Consumer Control"
19:25:29.7801 [INFO] registering /dev/input/event2: "AT Translated Set 2 keyboard"
19:25:30.0580 [INFO] Starting kanata proper
19:25:30.0581 [INFO] You may forcefully exit kanata by pressing lctl+spc+esc at any time. These keys refer to defsrc input, meaning BEFORE kanata remaps keys.
19:25:39.8899 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_RIGHTALT (100), value: Press }
19:25:39.8900 [DEBUG] (3) kanata_state_machine::kanata: entering sequence mode
19:25:40.0198 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_O (24), value: Press }
19:25:40.0198 [DEBUG] (3) kanata_state_machine::kanata::sequences: sequence got O
19:25:40.0198 [DEBUG] (3) kanata_state_machine::kanata::sequences: overlap seq is invalid; filling with standard seq
19:25:40.0198 [DEBUG] (3) kanata_state_machine::kanata::sequences: sequence complete; tapping fake key
19:25:40.0209 [DEBUG] (3) kanata_state_machine::kanata: key release   O
19:25:40.0209 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_O), value: 0 }
19:25:40.0209 [DEBUG] (3) kanata_state_machine::oskbd::linux: sending unicode ö
19:25:40.0209 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_LEFTCTRL), value: 1 }
19:25:40.0209 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_LEFTSHIFT), value: 1 }
19:25:40.0209 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_U), value: 1 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_U), value: 0 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_LEFTSHIFT), value: 0 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_LEFTCTRL), value: 0 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_F), value: 1 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_F), value: 0 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_6), value: 1 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_6), value: 0 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_ENTER), value: 1 }
19:25:40.0210 [DEBUG] (3) kanata_state_machine::oskbd::linux: send to uinput: InputEvent { time: SystemTime { tv_sec: 0, tv_nsec: 0 }, kind: Key(KEY_ENTER), value: 0 }
19:25:40.0512 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_RIGHTALT (100), value: Release }
19:25:40.1224 [DEBUG] (3) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_O (24), value: Release }

### Operating system

archlinux

### Additional context

_No response_

Metadata

Metadata

Assignees

Labels

blockedBlocked on issues outside of the reasonable control of the kanata projectbugSomething isn't workinglinuxIssue pertains to Linux only

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions