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

cmd+shift+] doesn't work #4251

Closed
joshmedeski opened this issue Sep 5, 2023 · 10 comments
Closed

cmd+shift+] doesn't work #4251

joshmedeski opened this issue Sep 5, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@joshmedeski
Copy link

joshmedeski commented Sep 5, 2023

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

wezterm 20230712-072601-f4abf8fd

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

I'm unable to setup the keybinding cmd+shift+] on macOS.

To Reproduce

I've added the appropriate config.key table entry for configuring the mapping.

Configuration

I've tried the following in the keys section.

		{
			mods = "CMD",
			key = "}",
			action = act.Multiple({
				act.SendKey({ mods = "CTRL", key = "b" }),
				act.SendKey({ key = "n" }),
			}),
		},

I've also tried this:

		{
			mods = "CMD|SHIFT",
			key = "]",
			action = act.Multiple({
				act.SendKey({ mods = "CTRL", key = "b" }),
				act.SendKey({ key = "n" }),
			}),
		},

Expected Behavior

I expect the binding to be honored and run the defined action.

Logs

No response

Anything else?

  • I have tried binding to just cmd+] and everything works as expected. It's when I try to bind to } (shift+]) that it does not work.
  • In the debug overlay, I can see CMD+] CTRL+SHIFT+] but when I switch it for CMD or HYPER the program never registers the key event.
@joshmedeski joshmedeski added the bug Something isn't working label Sep 5, 2023
@kaddkaka
Copy link

Have you tried binding it to CTRL+SHIFT+}?

@joshmedeski
Copy link
Author

Yes, I've tried every variation I could think of.

@rochacbruno
Copy link

rochacbruno commented Sep 11, 2023

I had the same issue today trying to map { + Ctrl

I decided to build wezterm from main branch and it worked

  {
    key = '{',
    mods = 'CTRL | SHIFT | ALT',
    action = wezterm.action.RotatePanes 'Clockwise'
  },
  {
    key = '}',
    mods = 'CTRL | SHIFT | ALT',
    action = wezterm.action.RotatePanes 'CounterClockwise'
  },

@joshmedeski
Copy link
Author

I built from source and I had no luck getting the keybinding to work. I tried multiple variations of the configuration.

@joshmedeski
Copy link
Author

ALT|SHIFT and CTRL|SHIFT worked, but CMD|SHIFT and SUPER|SHIFT do not.

{
			mods = "ALT|SHIFT",
			key = "}",
			action = act.Multiple({
				act.SendKey({ mods = "CTRL", key = "b" }),
				act.SendKey({ key = "n" }),
			}),
		}

@rochacbruno
Copy link

Run wezterm with wezterm --config debug_key_events=true and then see if wez is getting the key combo you are typing

@joshmedeski
Copy link
Author

As mentioned previously:

In the debug overlay, I can see CMD+] CTRL+SHIFT+] but when I switch it for CMD or HYPER the program never registers the key event.

Nothing gets shown on the logs when I trigger the keybinding I'm hoping to configure 😢

@wez
Copy link
Owner

wez commented Sep 13, 2023

Take a look at:

$ wezterm show-keys --lua | grep TabRelative | grep CMD

I'm on linux at the moment, so it looks a little different for me:

$ wezterm show-keys --lua | grep TabRelative | grep SUPER
    { key = '[', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(-1) },
    { key = ']', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(1) },
    { key = '{', mods = 'SUPER', action = act.ActivateTabRelative(-1) },
    { key = '{', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(-1) },
    { key = '}', mods = 'SUPER', action = act.ActivateTabRelative(1) },
    { key = '}', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(1) },

I think you need to hit all of those combos otherwise macos will prioritize the menubar shortcut, which happens before wezterm has a chance to process the key combination.

@joshmedeski
Copy link
Author

That was it @wez!

I ended up overwriting the app shortcut to something else so I can use CMD+} for tmux.

SCR-20230913-nhek

@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants