Closed noughtmare closed 3 years ago
I can't reproduce. I'm using US altgr-intl and pressing altgr-shift-' and then e produces ë for me (btw altgr-r is an easier way to type this character on this layout).
I'm using version 0.21.2. I didn't test 0.20.3 now, but when I was using this version earlier at least the non-ascii characters I'm regularly using (æ, ø and å) was working fine.
I cannot reproduce either with those steps, ë is produced as expected, X11, kitty from master.
You can see the detailed keyboard handling debug log with --debug-input
Altgr-r does work for me. This is the output with --debug-input
:
$ kitty --debug-input
Loading new XKB keymaps
Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1
Press xkb_keycode: 0x6c clean_sym: ISO_Level3_Shift composed_sym: ISO_Level3_Shift mods: numlock glfw_key: 57453 (ISO_LEVEL3_SHIFT) xkb_key: 65027 (ISO_Level3_Shift) alternate_key: 57449 (RIGHT_ALT)
on_key_input: glfw key: 0xe06d native_code: 0xfe03 action: PRESS mods: numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Press xkb_keycode: 0x32 clean_sym: Shift_L composed_sym: Shift_L active_unknown_mods: Mod5 mods: numlock glfw_key: 57441 (LEFT_SHIFT) xkb_key: 65505 (Shift_L)
on_key_input: glfw key: 0xe061 native_code: 0xffe1 action: PRESS mods: numlock 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: 0x30 clean_sym: apostrophe compose not complete, ignoring.
Release xkb_keycode: 0x30 clean_sym: apostrophe mods: shift+numlock glfw_key: 39 (') xkb_key: 39 (apostrophe)
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: 0x6c clean_sym: ISO_Level3_Shift mods: numlock glfw_key: 57453 (ISO_LEVEL3_SHIFT) xkb_key: 65027 (ISO_Level3_Shift) alternate_key: 57449 (RIGHT_ALT)
on_key_input: glfw key: 0xe06d native_code: 0xfe03 action: RELEASE mods: numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Release xkb_keycode: 0x32 clean_sym: Shift_L mods: shift+numlock glfw_key: 57441 (LEFT_SHIFT) xkb_key: 65505 (Shift_L)
on_key_input: glfw key: 0xe061 native_code: 0xffe1 action: RELEASE mods: shift+numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Press xkb_keycode: 0x1a clean_sym: e composed_sym: e text: e mods: numlock glfw_key: 101 (e) xkb_key: 101 (e)
on_key_input: glfw key: 0x65 native_code: 0x65 action: PRESS mods: numlock text: 'e' state: 0 sent text to child
Release xkb_keycode: 0x1a clean_sym: e mods: numlock glfw_key: 101 (e) xkb_key: 101 (e)
on_key_input: glfw key: 0x65 native_code: 0x65 action: RELEASE mods: numlock 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: 0x16 clean_sym: BackSpace composed_sym: BackSpace mods: numlock glfw_key: 57347 (BACKSPACE) xkb_key: 65288 (BackSpace)
on_key_input: glfw key: 0xe003 native_code: 0xff08 action: PRESS mods: numlock text: '' state: 0 sent key to child
Release xkb_keycode: 0x16 clean_sym: BackSpace mods: numlock glfw_key: 57347 (BACKSPACE) xkb_key: 65288 (BackSpace)
on_key_input: glfw key: 0xe003 native_code: 0xff08 action: RELEASE mods: numlock 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: 0x25 clean_sym: Control_L composed_sym: Control_L mods: ctrl+numlock glfw_key: 57442 (LEFT_CONTROL) xkb_key: 65507 (Control_L)
on_key_input: glfw key: 0xe062 native_code: 0xffe3 action: PRESS mods: ctrl+numlock text: '' state: 0 ignoring as keyboard mode does not support encoding this event
Press xkb_keycode: 0x28 clean_sym: d composed_sym: d mods: ctrl+numlock glfw_key: 100 (d) xkb_key: 100 (d)
on_key_input: glfw key: 0x64 native_code: 0x64 action: PRESS mods: ctrl+numlock text: '' state: 0 sent key to child
That is with a backspace and ctrl-d at the end. Does that look normal?
Edit: this is with:
$ kitty --version
kitty 0.21.2 created by Kovid Goyal
Edit2: this is the output of xev with the same keystrokes:
KeyPress event, serial 33, synthetic NO, window 0x6200001,
root 0x23d, subw 0x0, time 20419383, (1267,271), root:(1268,299),
state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x6200001,
root 0x23d, subw 0x0, time 20421336, (1267,271), root:(1268,299),
state 0x90, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
MappingNotify event, serial 33, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
KeyPress event, serial 33, synthetic NO, window 0x6200001,
root 0x23d, subw 0x0, time 20424315, (1267,271), root:(1268,299),
state 0x91, keycode 48 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 2 bytes: (c2 a8) "¨"
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
I also just noticed that this only happens on my external keyboard, not on the keyboard that is built-in to my laptop.
I now also found out that the XkbNewKeyboardNotify
request is not sent when I try this on my internal laptop keyboard, so I think that that is the issue. For my external keyboard the altgr-intl shortcuts do not work properly when an XkbNewKeyboardNotify
code is sent in the middle of them. I can now also reproduce it as follows:
setxkbmap -layout us -variant altgr-intl
<AltGr><Shift>'
(at the same time and the apostrophe last)e
on the second keyboarde
is produced and not ë
.I admit that this is a strange use-case but it seems to be that my external keyboard is actually automatically doing something like this. Other applications can deal with this properly. So, @kovidgoyal can you please consider reopening this?
Edit: another reproducer for if you have only one keyboard:
setxkbmap -layout us -variant altgr-intl
<AltGr><Shift>'
(at the same time and the apostrophe last)e
e
is produced and not ë
.dup of #2787
Describe the bug
The altgr-intl keyboard layout does not work in kitty. It does work in other applications like Firefox and even other terminals like alacritty and urxvt.
To Reproduce Steps to reproduce the behavior:
setxkbmap -layout us -variant altgr-intl
<AltGr><Shift>'
(at the same time and the apostrophe last)e
e
is produced instead ofë
.Environment details
Additional context
I can reproduce it with
kitty --config NONE
.