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

bindsym hotkey using 'dead_circumflex' not working as expected #5872

Open
cyvcloud opened this issue Jan 23, 2024 · 4 comments
Open

bindsym hotkey using 'dead_circumflex' not working as expected #5872

cyvcloud opened this issue Jan 23, 2024 · 4 comments
Labels
4.23 bug missing-log Read the CONTRIBUTING.md file for instructions waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment.

Comments

@cyvcloud
Copy link

cyvcloud commented Jan 23, 2024

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

I'm starting a dropdown terminal like this (where the dropdown-tmux script just sets up some default tmux layout):

for_window [instance="dropdown"] floating enable
for_window [instance="dropdown"] resize set 800 550
for_window [instance="dropdown"] move scratchpad
# Runs a script, which searches for an earlier tmux instance,
# otherwise starts a new one (to prevent multiple dropdown sessions).
exec $term --class dropdown --title dropdown -e ~/.config/scripts/dropdown-tmux

Now defining a bindsym hotkey like this

bindsym $mod+dead_circumflex [instance="dropdown"] scratchpad show [instance="dropdown"] move position center

to open the dropdown terminal using the hotkey "$mod + ^" changed behaviour recently. Before pressing "$mod + ^" would basically "swallow" the "^" input and just open the terminal. Now it still opens the terminal but also buffers the "^" input in the window that is active while I press the hotkey. This is a pretty annoying effect as if I close the dropdown terminal on an empty line the next time I open it it will have a buffered "^" so when I type "cd" the actual input will be "ĉd". Unfortunately I don't know which update of which component on the system exactly is responsible for this changed behaviour.

Expected Behavior

The "$mod + ^" hotkey should just open the terminal and not buffer the "^" input.

Reproduction Instructions

Define a bindsym hotkey with $mod+dead_circumflex and check if the "^" input gets buffered in the active window while pressing the hotkey.

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.23 (2023-10-29) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.23 (2023-10-29) (pid 1337)
Loaded i3 config:
  /home/$user/.config/i3/config (main) (last modified: So 14 Jan 2024 17:54:42 CET, 742558 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
- Linux Distribution & Version: Arch Linux
- Are you using a compositor (e.g., xcompmgr or compton): no compositor
@i3bot i3bot added bug missing-log Read the CONTRIBUTING.md file for instructions labels Jan 23, 2024
@i3bot
Copy link

i3bot commented Jan 23, 2024

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot i3bot added the 4.23 label Jan 23, 2024
@okraits
Copy link
Contributor

okraits commented Jan 23, 2024

Does xev return dead_circumflex on your machine when pressing the ^ key?

xev returns the keysym asciicircum for ^ on my machine. Using that in a keybinding like

bindsym $mod+asciicircum exec alacritty

works just fine.

Another thing to note is that I'm using the variant nodeadkeys with my keyboard layout.

@cyvcloud
Copy link
Author

cyvcloud commented Jan 23, 2024

Yes, xev gives me dead_circumflex:

KeyPress event, serial 31, synthetic NO, window 0xb600001,
    root 0x625, subw 0x0, time 38963345, (274,412), root:(3158,432),
    state 0x10, keycode 49 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: True

KeyRelease event, serial 34, synthetic NO, window 0xb600001,
    root 0x625, subw 0x0, time 38963417, (274,412), root:(3158,432),
    state 0x10, keycode 49 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False

My current keymap settings:

$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     de
options:    caps:swapescape
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwertz)
types:      complete
compat:     complete
symbols:    pc+de+inet(evdev)+capslock(swapescape)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwertz)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+de+inet(evdev)+capslock(swapescape)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

Edit: Setting the nodeadkeys variant changes the xev key symbol to asciicircum which works as expected. Thanks for the pointer in the right direction. :)

@orestisfl
Copy link
Member

orestisfl commented Jan 23, 2024

Some things to try:

  1. Can you downgrade i3 and try again? Let's make sure that an i3 update is involved in this at all. Try with 4.22 and if the problem is still there also try 4.21.
  2. Try bindsym $mod+dead_circumflex nop and see if the currently focused terminal (please use a popular well-known terminal for easy reproduction) also gets the ^ key as in your original issue.

@orestisfl orestisfl added the waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment. label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.23 bug missing-log Read the CONTRIBUTING.md file for instructions waiting Waiting for feedback/changes from the author of the issue/PR. Make sure to notify us with a comment.
Projects
None yet
Development

No branches or pull requests

4 participants