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

Ctrl-W does nothing on Mac #732

Closed
bacook17 opened this issue Nov 29, 2023 · 4 comments · Fixed by #743
Closed

Ctrl-W does nothing on Mac #732

bacook17 opened this issue Nov 29, 2023 · 4 comments · Fixed by #743
Labels

Comments

@bacook17
Copy link

I'm using Jupyterlab Desktop (v 4.0.7-1) on a Mac (Sonoma 14.0, on Apple Silicon) and am unable to get the Ctrl-W keybinding to pass through to the terminal.

Specifically, Ctrl-W is a primary keybinding (kill-region) in Emacs, which I open from within a terminal in Jupyterlab.

I'm aware of the following issues / PRs related to capturing Ctrl-W (on Windows/Linux) or Cmd-W (on Mac) for closing the window and/or tabs.
#436
#630
#606

However, I believe the unintended consequence is that for Macs, BOTH Ctrl-W and Cmd-W get captured. And, even if the option is set to "Do Not Close", the commands are not sent on into the terminal.

If I use the browser-based version of Jupyterlab (Chrome 119.0.6045.159 on my Mac), then Ctrl-W is sent through to the terminal as expected.

@bacook17 bacook17 added the bug label Nov 29, 2023
Copy link

welcome bot commented Nov 29, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link

@mbektas Possibly related to #644, which maps CTRL+W or CMD+W? I would expect that on macOS, CTRL+W would be unmapped so it gets passed through to a terminal, although @bacook17 is finding that CTRL+W isn't getting propagated at all.

@bacook17
Copy link
Author

Hi @JasonWeill ,
I believe these lines suggest that on macOS both Ctrl+W and Meta+W get captured
https://github.com/jupyterlab/jupyterlab-desktop/blob/master/src/main/labview/labview.ts#L86-L89

@mbektas
Copy link
Member

mbektas commented Dec 17, 2023

hi @bacook17 . It looks like the code lines you shared point to the bug. this line, should have been like
((input.meta && process.platform === 'darwin') || input.control && process.platform !== 'darwin').

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

Successfully merging a pull request may close this issue.

3 participants