You are not logged in.

#1 2021-04-21 19:15:34

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Kitty terminal (some characters appear)

Guys, what is the problem?
Earlier all work fine, but today some characters appear in terminal when i pressed WIN + some key

5;9u1;9u....

I tried others terminals, but there all work fine
Also i'm using dwm (maybe there some problem?)

Last edited by DemonLord (2021-04-21 19:19:05)

Offline

#2 2021-04-21 20:18:14

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

Looks like botched escape sequences.
Please post an exact IO map (ie. which combination you press and which output it produces) and explain what  the combinations are supposed to do (eg. tmux control?)

Offline

#3 2021-04-21 20:35:30

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

seth wrote:

Looks like botched escape sequences.
Please post an exact IO map (ie. which combination you press and which output it produces) and explain what  the combinations are supposed to do (eg. tmux control?)

When i press Win + Space (to change layout) it shows me in terminal the characters:

;9u

Interesting thing i noticed. When i use tmux the characters don't show up

Last edited by DemonLord (2021-04-21 20:35:49)

Offline

#4 2021-04-21 20:52:28

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

tmux changes the $TERM, thus the termcap.
Do you force-export some TERM=stuff in your shell rc?

Offline

#5 2021-04-21 21:01:20

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

seth wrote:

tmux changes the $TERM, thus the termcap.
Do you force-export some TERM=stuff in your shell rc?

No, i don't export something

Here is output of env. variable $TERM

$ echo $TERM
xterm-kitty

Last edited by DemonLord (2021-04-21 21:01:33)

Offline

#6 2021-04-21 21:20:35

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

https://sw.kovidgoyal.net/kitty/keyboard-protocol.html suggests that kitty just prints the keycode, "9" indicates shift+super and apparently there's no space (or any keycode)


xev -event keyboard

What does win+space produce there?

Offline

#7 2021-04-22 10:43:54

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

seth wrote:

https://sw.kovidgoyal.net/kitty/keyboard-protocol.html suggests that kitty just prints the keycode, "9" indicates shift+super and apparently there's no space (or any keycode)


xev -event keyboard

What does win+space produce there?

$ xev -event keyboard                                                
Outer window is 0x3a00001, inner window is 0x3a00002

KeymapNotify event, serial 24, synthetic NO, window 0x0,
    keys:  4294967243 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeymapNotify event, serial 24, synthetic NO, window 0x0,
    keys:  4294967243 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 25, synthetic NO, window 0x3a00001,
    root 0x79a, subw 0x0, time 5650228, (331,436), root:(349,475),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x3a00001,
    root 0x79a, subw 0x0, time 5653942, (339,435), root:(357,474),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x3a00001,
    root 0x79a, subw 0x0, time 5654120, (339,435), root:(357,474),
    state 0x40, keycode 65 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x3a00001,
    root 0x79a, subw 0x0, time 5654169, (339,435), root:(357,474),
    state 0x2040, keycode 65 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x3a00001,
    root 0x79a, subw 0x0, time 5654264, (339,435), root:(357,474),
    state 0x2040, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Last edited by DemonLord (2021-04-22 10:44:14)

Offline

#8 2021-04-22 11:48:52

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

That's Win+AltGr … ?

setxkbmap -print -query

Offline

#9 2021-04-22 12:52:12

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

seth wrote:

That's Win+AltGr … ?

setxkbmap -print -query

Win + Space

$ setxkbmap -print -query                                                                             [15:50:23]
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+ru:2+inet(evdev)+group(win_space_toggle)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
rules:      evdev
model:      pc105
layout:     us,ru
options:    grp:win_space_toggle

Offline

#10 2021-04-22 13:04:22

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

Ah, it's the next group (keyboard! layout) that you bound to win+space (win+space isn't supposed to do something in your terminal - we're getting there ;-)
Is it *only* that shortcut that produces such sequcences and does it depend on which layout you're currently  in?
Does running "xdotool key ISO_Next_Group" produce the same output in kitty?

Offline

#11 2021-04-22 16:33:58

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

seth wrote:

Ah, it's the next group (keyboard! layout) that you bound to win+space (win+space isn't supposed to do something in your terminal - we're getting there ;-)
Is it *only* that shortcut that produces such sequcences and does it depend on which layout you're currently  in?
Does running "xdotool key ISO_Next_Group" produce the same output in kitty?

Didn't really understand what do you mean by shortcut
The characters don't depend on which layout i'm currently in. I can switch between layout but always get the output.

Xdotool. Yeah, very similar output

$ xdotool key ISO_Next_Group                                                                                                                                                                    
^[[32;9u%      

Offline

#12 2021-04-22 19:00:36

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

Didn't really understand what do you mean by shortcut

related key combinations, eg. win+x or so.

I assume kitty doesn't have to be the active window when changing the layout to trigger that output?
Does it respond to other keymap changes, eg. "setxkbmap -layout ru"?

Offline

#13 2021-04-24 07:54:09

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

seth wrote:
Didn't really understand what do you mean by shortcut

related key combinations, eg. win+x or so.

I assume kitty doesn't have to be the active window when changing the layout to trigger that output?
Does it respond to other keymap changes, eg. "setxkbmap -layout ru"?

Yes, it doesn't have to be the active window when i change the layout, but it can be

No output then i typed it

$ setxkbmap -layout ru                                                                                

It works without give me the characters with another layout, e.g.

$ setxkbmap -layout us,ru -option grp:shift_caps_toggle  
 

I can change layout with shift caps and no characters appear in terminal, but i wanna do it with win_space

Offline

#14 2021-04-24 08:10:38

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

I asume this is some weird interference in kitty wrt the layout change while the win modifier is active (though that doesn't explain the reaction to the xdotool command)
=> File a bug against kitty upstream.

In the meantime, hacko mui uglido™:
Configure a different (or no) group toggle shortcut and use some external shortcut daemon to bind win+space to "xdotool key ISO_Next_Group"
Since/if the modifier triggers this, you'd have to give yourself some slack to release the win key before xdotool fires, so

sleep 0.25 && xdotool key ISO_Next_Group

Offline

#15 2021-05-09 08:12:50

DemonLord
Member
Registered: 2021-04-21
Posts: 23

Re: Kitty terminal (some characters appear)

Problem solved after update.
version kitty 0.20.3-1

Offline

#16 2021-05-09 12:25:16

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Kitty terminal (some characters appear)

Awesome.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB