Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User .XCompose file not loaded #3827

Closed
crater2150 opened this issue Jul 12, 2021 · 2 comments
Closed

User .XCompose file not loaded #3827

crater2150 opened this issue Jul 12, 2021 · 2 comments
Labels

Comments

@crater2150
Copy link

Describe the bug
Compose sequences defined in my user compose file (~/.XCompose) do not work in kitty for me. Other programs (e.g. my browser) recognize them. I tried with the following minimal ~/.XCompose, which should insert an α when typing Compose, *, a:

<Multi_key> <asterisk> <a>      : "α"  U03B1       # GREEK SMALL LETTER ALPHA

Compose sequences defined in the locale's XCompose on the other hand do work, e.g. Compose, s, s inserts ß.

I tried with kitty 0.21.1 from Voidlinux and current master built from git.

To Reproduce
Steps to reproduce the behavior:

  1. Create above compose file in ~/.XCompose
  2. Run kitty (I used kitty --debug-keyboard --config NONE
  3. Press Compose, *, a
  4. Kitty shows *a instead of α

Environment details

kitty 0.21.2 (3a322c5c6e) created by Kovid Goyal
Linux deskhorst 5.12.14_1 #1 SMP 1625102948 x86_64
Void \r (\n) (\l)
Running under:X11

Config options different from defaults:

Additional context
Output from kitty --debug-keyboard on launch:

Loading new XKB keymaps
Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1

Output from kitty --debug-keyboard, when typing Compose, s, s (working case, locale XCompose, outputs ß):

Press xkb_keycode: 0x5e clean_sym: Multi_key compose not complete, ignoring.
Release xkb_keycode: 0x5e clean_sym: Multi_key mods: none glfw_key: 0 (UNKNOWN) xkb_key: 65312 (Multi_key) alternate_key: 60 (<)
on_key_input: glfw key: 0x0 native_code: 0xff20 action: RELEASE mods: none text: '' state: 0 ignoring release event for previous press that was handled as shortcut
Press xkb_keycode: 0x27 clean_sym: s compose not complete, ignoring.
Release xkb_keycode: 0x27 clean_sym: s mods: none glfw_key: 115 (s) xkb_key: 115 (s)
Press xkb_keycode: 0x27 clean_sym: s composed_sym: ssharp composed_text: ß mods: none glfw_key: 223 (ß) xkb_key: 223 (ssharp) shifted_key: 115 (s) alternate_key: 115 (s)
on_key_input: glfw key: 0xdf native_code: 0xdf action: PRESS mods: none text: 'ß' state: 0 sent text to child
Release xkb_keycode: 0x27 clean_sym: s mods: none glfw_key: 115 (s) xkb_key: 115 (s)

Output from kitty --debug-keyboard, when typing Compose, *, a (non-working case, user XCompose, outputs *a):

Press xkb_keycode: 0x5e clean_sym: Multi_key compose not complete, ignoring.
Release xkb_keycode: 0x5e clean_sym: Multi_key mods: none glfw_key: 0 (UNKNOWN) xkb_key: 65312 (Multi_key) alternate_key: 60 (<)
on_key_input: glfw key: 0x0 native_code: 0xff20 action: RELEASE mods: none text: '' state: 0 ignoring release event for previous press that was handled as shortcut
Press xkb_keycode: 0x32 clean_sym: Shift_L composed_sym: Shift_L mods: none glfw_key: 57441 (LEFT_SHIFT) xkb_key: 65505 (Shift_L)
on_key_input: glfw key: 0xe061 native_code: 0xffe1 action: PRESS mods: none text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Got XkbNewKeyboardNotify event with changes: key codes: 1 geometry: 1 device id: 0
Loading new XKB keymaps
Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1
Press xkb_keycode: 0x11 clean_sym: 8 composed_sym: asterisk text: * mods: shift glfw_key: 56 (8) xkb_key: 56 (8) shifted_key: 42 (*)
on_key_input: glfw key: 0x38 native_code: 0x38 action: PRESS mods: shift text: '*' state: 0 sent text to child
Release xkb_keycode: 0x11 clean_sym: 8 mods: shift glfw_key: 56 (8) xkb_key: 56 (8) shifted_key: 42 (*)
on_key_input: glfw key: 0x38 native_code: 0x38 action: RELEASE mods: shift text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Got XkbNewKeyboardNotify event with changes: key codes: 1 geometry: 1 device id: 0
Loading new XKB keymaps
Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1
Release xkb_keycode: 0x32 clean_sym: Shift_L mods: none glfw_key: 57441 (LEFT_SHIFT) xkb_key: 65505 (Shift_L)
on_key_input: glfw key: 0xe061 native_code: 0xffe1 action: RELEASE mods: none text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Press xkb_keycode: 0x26 clean_sym: a composed_sym: a text: a mods: none glfw_key: 97 (a) xkb_key: 97 (a)
on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a' state: 0 sent text to child
Release xkb_keycode: 0x26 clean_sym: a mods: none glfw_key: 97 (a) xkb_key: 97 (a)
@crater2150 crater2150 added the bug label Jul 12, 2021
@kovidgoyal
Copy link
Owner

kitty uses libxkbcommon for loading compose files, you will need to ask
its maintainers why it doesn't like your ~/.XCompose If you run kitty
from another terminal you will likely see an error about it printed out.

@crater2150
Copy link
Author

There is no error message regarding the compose file, if I just launch kitty without typing anything, there is no output besides

Loading new XKB keymaps
Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1

I don't think I have any other programs, which use libxkbcommon directly instead of through Qt/GTK, so I can't test, if they work. For anyone interested, I reported this as xkbcommon/libxkbcommon#254.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants