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

Unable to use multiple characters with international keyboards on MacOS in 4.1.0 #15744

Closed
miccoli opened this issue Feb 5, 2024 · 40 comments · Fixed by #15761, #15790 or #15927
Closed

Unable to use multiple characters with international keyboards on MacOS in 4.1.0 #15744

miccoli opened this issue Feb 5, 2024 · 40 comments · Fixed by #15761, #15790 or #15927
Labels
bug os:macos Issues specific to macOS operating system pkg:application tag:Keyboard Compatibility issues with keyboards, including locale-specific and layout-specific issues tag:Regression Behavior that had been broken, was fixed, and is broken again
Milestone

Comments

@miccoli
Copy link

miccoli commented Feb 5, 2024

Description

Unable to use [ ] in editor with Italian keyboard on macOS.

Reproduce

The Italian keyboard does not have [ ] keys, which are accessed via the option key. Apparently the new keyboard shortcuts ⌥[ and ⌥] mask the ability to properly input these characters.

  1. Open a
    • notebook, or
    • console, or
    • text/markdown/python file
  2. Type a = [1]
  3. The [ ] do not appear.

Please note that typing [ at the start of a line results in the expected behaviour. Terminals work as expected.
This bug surfaced after the installation of v. 4.1.0: v. 4.0.12 works as expected.

Context

  • Operating System and version: macOS Sonoma 14.2.1
  • Browser and version: Chrome 121.0.6167.139 and Safari 17.2.1
  • JupyterLab version: 4.1.0
Troubleshoot Output
$PATH:
	/Users/miccoli/.pyenv/versions/jupyter_312/bin
	/opt/homebrew/Cellar/pyenv/2.3.35/libexec
	/opt/homebrew/Cellar/pyenv/2.3.35/plugins/python-build/bin
	/opt/homebrew/Cellar/pyenv-virtualenv/1.2.1/shims
	/Users/miccoli/.pyenv/shims
	/opt/homebrew/bin
	/opt/homebrew/sbin
	/usr/local/bin
	/System/Cryptexes/App/usr/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
	/Library/Apple/usr/bin
	/Library/TeX/texbin

sys.path:
/Users/miccoli/.pyenv/versions/3.12.0/envs/jupyter_312/bin
/Users/miccoli/.pyenv/versions/3.12.0/lib/python312.zip
/Users/miccoli/.pyenv/versions/3.12.0/lib/python3.12
/Users/miccoli/.pyenv/versions/3.12.0/lib/python3.12/lib-dynload
/Users/miccoli/.pyenv/versions/jupyter_312/lib/python3.12/site-packages

sys.executable:
/Users/miccoli/.pyenv/versions/jupyter_312/bin/python3.12

sys.version:
5.12.0 (main, Nov 6 2023, 14:39:01) [Clang 15.0.0 (clang-1500.0.40.1)]

platform.platform():
macOS-14.2.1-arm64-arm-64bit

which -a jupyter:
/Users/miccoli/.pyenv/versions/jupyter_312/bin/jupyter
/Users/miccoli/.pyenv/shims/jupyter

pip list:
Package Version
------------------------- ---------------
anyio 4.2.0
appnope 0.1.3
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
black 24.1.1
bleach 6.1.0
bokeh 3.3.4
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
comm 0.2.1
contourpy 1.2.0
debugpy 1.8.0
decorator 5.1.1
defusedxml 0.7.1
executing 2.0.1
fastjsonschema 2.19.1
fqdn 1.5.1
h11 0.14.0
httpcore 1.0.2
httpx 0.26.0
idna 3.6
ipykernel 6.29.0
ipython 8.21.0
ipywidgets 8.1.1
isoduration 20.11.0
isort 5.13.2
jedi 0.19.1
Jinja2 3.1.3
json5 0.9.14
jsonpointer 2.4
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter_client 8.6.0
jupyter-contrib-core 0.4.2
jupyter_core 5.7.1
jupyter-events 0.9.0
jupyter-lsp 2.2.2
jupyter_server 2.12.5
jupyter_server_terminals 0.5.2
jupyterlab 4.1.0
jupyterlab_code_formatter 2.2.1
jupyterlab_pygments 0.3.0
jupyterlab_server 2.25.2
jupyterlab-widgets 3.0.9
linkify-it-py 2.0.3
Markdown 3.5.2
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib-inline 0.1.6
mdit-py-plugins 0.4.0
mdurl 0.1.2
mistune 3.0.2
mypy-extensions 1.0.0
nbclient 0.9.0
nbconvert 7.14.2
nbformat 5.9.2
nest-asyncio 1.6.0
notebook 7.0.7
notebook_shim 0.2.3
numpy 1.26.3
overrides 7.7.0
packaging 23.2
pandas 2.1.4
pandocfilters 1.5.1
panel 1.3.8
param 2.0.2
parso 0.8.3
pathspec 0.12.1
pexpect 4.9.0
pillow 10.2.0
pip 24.0
platformdirs 4.2.0
prometheus-client 0.19.0
prompt-toolkit 3.0.43
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
Pygments 2.17.2
python-dateutil 2.8.2
python-json-logger 2.0.7
pytz 2024.1
pyviz_comms 3.0.1
PyYAML 6.0.1
pyzmq 25.1.2
referencing 0.33.0
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.17.1
Send2Trash 1.8.2
setuptools 69.0.2
six 1.16.0
sniffio 1.3.0
soupsieve 2.5
stack-data 0.6.3
terminado 0.18.0
tinycss2 1.2.1
tornado 6.4
tqdm 4.66.1
traitlets 5.14.1
types-python-dateutil 2.8.19.20240106
typing_extensions 4.9.0
tzdata 2023.4
uc-micro-py 1.0.2
uri-template 1.3.0
urllib3 2.2.0
wcwidth 0.2.13
webcolors 1.13
webencodings 0.5.1
websocket-client 1.7.0
widgetsnbextension 4.0.9
xyzservices 2023.10.1

Command Line Output

Nothing sensible here, apparently.

Browser Output
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Language pack 'en' not installed!
fetch @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Deprecated shortcut selectors: "[data-jp-kernel-user]:focus" was replaced with "[data-jp-kernel-user] :focus:not(:read-write)" in JupyterLab 4.1 (present in "[data-jp-kernel-user]:focus")
".jp-Notebook:focus" was replaced with ".jp-Notebook.jp-mod-commandMode :focus:not(:read-write)" in JupyterLab 4.1 (present in ".jp-Notebook:focus")
"[data-jp-traversable]:focus" was replaced with ".jp-Notebook.jp-mod-commandMode :focus:not(:read-write)" in JupyterLab 4.1 (present in "[data-jp-traversable]:focus")
".jp-Notebook:focus.jp-mod-commandMode" was replaced with ".jp-Notebook.jp-mod-commandMode :focus:not(:read-write)" in JupyterLab 4.1 (present in ".jp-Notebook:focus.jp-mod-commandMode")

The selectors will be substituted transparently this time, but need to be updated at source before next major release.
p @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting application in workspace: "default"
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
705.254abada6a4b8e081d74.js?v=254abada6a4b8e081d74:1 JupyterLab extension jupyterlab_code_formatter is activated!
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Skipping this shortcut because it collides with another shortcut. Object
(anonymous) @ jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/e331369b-57e9-47bd-9818-c6278ea4335c
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/e331369b-57e9-47bd-9818-c6278ea4335c
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/e331369b-57e9-47bd-9818-c6278ea4335c
336.ebc7a55ea1768712771f.js?v=ebc7a55ea1768712771f:1 Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early
_loadFromKernel @ 336.ebc7a55ea1768712771f.js?v=ebc7a55ea1768712771f:1
about:srcdoc:1 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
:8888/panel-preview/render/untitled.txt:1 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/fcc88f77-adc7-4108-803e-03acd6835571
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/fcc88f77-adc7-4108-803e-03acd6835571
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/fcc88f77-adc7-4108-803e-03acd6835571
jlab_core.570a5c21bdeb57ca2ec8.js?v=570a5c21bdeb57ca2ec8:1 Starting WebSocket: ws://localhost:8888/api/kernels/b29ff37d-4d95-480f-9ed3-3aa76524877f

@miccoli miccoli added the bug label Feb 5, 2024
Copy link

welcome bot commented Feb 5, 2024

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! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Feb 5, 2024
@krassowski krassowski added this to the 4.1.x milestone Feb 5, 2024
@krassowski krassowski added tag:Regression Behavior that had been broken, was fixed, and is broken again pkg:completer labels Feb 5, 2024
@JasonWeill JasonWeill added the tag:Keyboard Compatibility issues with keyboards, including locale-specific and layout-specific issues label Feb 5, 2024
@PaulEcoffet
Copy link

It seems that this is caused by a massive amount of alt + number and alt + shift + number shortcuts that are bound to the action application:Show Left Activity Bar.

Screenshot 2024-02-06 at 09 51 02

The UI seems also broken and it is impossible to deactivate this shortcut using it.

As a workaround until fix, you can use the JSON settings editor (in the settings view, at shortcuts, click on JSON settings editor on the top right and then paste this :

Json to paste
{
    // Keyboard Shortcuts
    // @jupyterlab/shortcuts-extension:shortcuts
    // Keyboard shortcut settings.
    // *****************************************
    "shortcuts": [
  {
    "args": {
      "side": "left",
      "index": 0
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 1"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 1
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 2"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 2
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 3"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 3
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 4"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 4
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 5"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 5
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 6"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 6
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 7"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 7
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 8"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 8
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 9"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 9
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 0"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 0
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 1"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 1
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 2"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 2
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 3"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 3
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 4"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 4
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 5"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 5
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 6"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 6
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 7"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 7
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 8"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 8
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 9"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 9
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 0"
    ],
    "selector": "body",
    "disabled": true
  }
]
    

}

@krassowski krassowski added os:macos Issues specific to macOS operating system pkg:application and removed pkg:completer labels Feb 6, 2024
@krassowski
Copy link
Member

Thank you for the extra details! These shortcuts were introduced in #14799. We can add overrides for mac by adding macKeys in addition to OS-agnostic keys. Is there a set of shortcuts that you would suggest that would work well on Mac? Is this specific to Italian keyboard, or does it affect all Macs?

@MatthiasWeh
Copy link

MatthiasWeh commented Feb 6, 2024

I can add that this is also an issue with a German keyboard layout, since [ , ], as well as {, }, |, or \ are all only accessible via the above mentioned Mac option key.

@krassowski krassowski changed the title Unable to use [ ] in editor with Italian keyboard on MacOS. Unable to use multiple characters with international keyboards on MacOS Feb 6, 2024
@krassowski
Copy link
Member

Thank you, this helps. @g547315 would you be able to open a quick PR to disable shortcuts added in #14799 on Mac by using macKeys: []?

@JasonWeill JasonWeill removed the status:Needs Triage Applied to new issues that need triage label Feb 6, 2024
@psychemedia
Copy link

psychemedia commented Feb 6, 2024

Noting the the many many option-digit keyboard shortcuts mean that things like option-3, which on a Mac UK keyboard is a # sign, don't work to give desired characters.

@psychemedia
Copy link

I also note that there doesnlt seem to be a way to delete the current default bindings?

@defjaf
Copy link

defjaf commented Feb 6, 2024

Are the 20 different bindings all for one action intended? Or a bug? (If not a bug: why has this behaviour been chosen??). Ok, I see from the json settings and the PR discussion that the different bindings are for selecting different objects in the sidebar — but I’ll note that this isn’t reflected at all in the GUI settings editor.

This seems like an obvious misfeature, along with an actual bug for the lack of ability to change the bindings in the editor...

(See https://discourse.jupyter.org/t/weird-option-digit-keybindings)

@krassowski
Copy link
Member

Thanks @defjaf, it should not be like that - I opened #15759 to track that issue.

@krassowski
Copy link
Member

Can someone with a Mac confirm that setting:

{
    "shortcuts": [
        {
            "args": {
                "side": "left",
                "index": 0
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 1"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 1
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 2"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 2
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 3"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 3
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 4"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 4
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 5"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 5
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 6"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 6
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 7"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 7
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 8"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 8
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 9"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "left",
                "index": 9
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt 0"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 0
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 1"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 1
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 2"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 2
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 3"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 3
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 4"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 4
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 5"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 5
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 6"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 6
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 7"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 7
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 8"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 8
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 9"
            ],
            "macKeys": [],
            "selector": "body"
        },
        {
            "args": {
                "side": "right",
                "index": 9
            },
            "command": "application:toggle-side-tabbar",
            "keys": [
                "Alt Shift 0"
            ],
            "macKeys": [],
            "selector": "body"
        },
    ]
}

Disables the shortcuts on Mac?

@MatthiasWeh
Copy link

No, the shortcuts are still active, as opposed to the '"disabled": true' workaround, which helped.

@defjaf
Copy link

defjaf commented Feb 7, 2024

Can someone with a Mac confirm that setting:

Disables the shortcuts on Mac?

@krassowski Unfortunately not! The version with "Disabled": true does fix it, but of course that deactivates the shortcuts everywhere.

@krassowski
Copy link
Member

Thank you! I believe #15761 should help, can you confirm by testing it on Binder (click on this link: https://mybinder.org/v2/gh/krassowski/jupyterlab/disable-alt-key-on-mac?urlpath=lab
and in 10-15 minutes you should see a freshly build JupyterLab instance; if the build times out on the first try please try again - Binder is under heavy load recently)

@MatthiasWeh
Copy link

MatthiasWeh commented Feb 7, 2024

MacOption + number and Shift-MacOption + number work as expected on Binder.

@defjaf
Copy link

defjaf commented Feb 7, 2024

It does seem to work on binder!

But I tried to add a version with "macKeys": [""] in my local Advanced Settings, but that doesn't seem to work.

@krassowski krassowski pinned this issue Feb 12, 2024
@krassowski
Copy link
Member

Thank you @piotrp88 for highlighting this. Looking at https://docs.github.com/en/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment#keyboard-shortcuts-for-macos the GH Copilot also uses these shortcuts for MacOS; do you know how would you access the Copilot on Italian Mac keyboard?

@krassowski
Copy link
Member

krassowski commented Feb 12, 2024

It looks like this is a known problem for Italian keyboard: https://github.com/orgs/community/discussions/7712 and https://github.com/orgs/community/discussions/14414

@krassowski krassowski reopened this Feb 12, 2024
@krassowski
Copy link
Member

Linking some related issues:

@krassowski
Copy link
Member

krassowski commented Feb 12, 2024

@piotrp88 (and anyone else affected), can you please confirm whether #15790 solves the issue of inline completer shortcuts by testing it out on Binder: https://mybinder.org/v2/gh/krassowski/jupyterlab/nice-keydown?urlpath=lab ?

Binder may load instantly or take take a few minutes to load and may require retrying by reloading tab if the first attempt fails.

@piotrp88
Copy link

@piotrp88 (and anyone else affected), can you please confirm whether #15790 solves the issue of inline completer shortcuts by testing it out on Binder: https://mybinder.org/v2/gh/krassowski/jupyterlab/nice-keydown?urlpath=lab ?

Binder may load instantly or take take a few minutes to load and may require retrying by reloading tab if the first attempt fails.

It seems to behave correctly. I can input square brackets inside the text using the Alt + [ and Alt + ] combinations and the backtick using the Alt + \ combination.

@nicocardiel
Copy link

I am using a Spanish keyboard. In order to be able to use the \{}[] symbols with Jupyterlab version 4.1.1, I have needed to disable some additional keyboard shortcuts. The full text that I have inserted in the User Preferences (JSON editor) is the following:

{
    // Keyboard Shortcuts
    // @jupyterlab/shortcuts-extension:shortcuts
    // Keyboard shortcut settings.
    // *****************************************
    "shortcuts": [
  {
    "args": {
      "side": "left",
      "index": 0
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 1"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 1
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 2"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 2
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 3"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 3
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 4"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 4
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 5"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 5
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 6"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 6
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 7"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 7
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 8"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 8
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 9"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "left",
      "index": 9
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt 0"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 0
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 1"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 1
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 2"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 2
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 3"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 3
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 4"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 4
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 5"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 5
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 6"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 6
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 7"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 7
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 8"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 8
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 9"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {
      "side": "right",
      "index": 9
    },
    "command": "application:toggle-side-tabbar",
    "keys": [
      "Alt Shift 0"
    ],
    "selector": "body",
    "disabled": true
  },
  {
    "args": {},
    "command": "inline-completer:next",
    "keys": [
        "Alt }"
    ],
    "selector": ".jp-mod-completer-enabled",
    "disabled": true
  },
  {
    "args": {},
    "command": "inline-completer:previous",
    "keys": [
        "Alt {"
    ],
    "selector": ".jp-mod-completer-enabled",
    "disabled": true
  },
  {
    "args": {},
    "command": "inline-completer:next",
    "keys": [
        "Alt ]"
    ],
    "selector": ".jp-mod-completer-enabled",
    "disabled": true
  },
  {
    "args": {},
    "command": "inline-completer:previous",
    "keys": [
        "Alt ["
    ],
    "selector": ".jp-mod-completer-enabled",
    "disabled": true
  },
  {
    "args": {},
    "command": "inline-completer:invoke",
    "keys": [
        "Alt \\"
    ],
    "selector": ".jp-mod-completer-enabled",
    "disabled": true
  },
]

}

@saf-dmitry
Copy link

saf-dmitry commented Feb 18, 2024

@nicocardiel I am using a Spanish keyboard. In order to be able to use the {}[] symbols with Jupyterlab version 4.1.1, I have needed to disable some additional keyboard shortcuts. The full text that I have inserted in the User Preferences (JSON editor) is the following:

I can confirm, this workaround works for German keyboard layout too.

@Dynami
Copy link

Dynami commented Feb 23, 2024

For Italian keyboards try to override "Keyboard shortcuts" > "System Default" adding in "User Preferences":
"shortcuts": [
{
"command": "inline-completer:next",
"selector": ".jp-mod-completer-enabled",
"keys": [
"Alt ["
],
"disabled": true
},
{
"command": "inline-completer:previous",
"selector": ".jp-mod-completer-enabled",
"keys": [
"Alt ]"
],
"disabled": true
}
]

@Fohlen
Copy link

Fohlen commented Feb 28, 2024

Hi, I found this to be a recession on my German keyboard too. Downgrading to jupyterlab==4.0.13 fixed the issue, so it was definitely introduced not too long ago.

@flamboyantfunctor
Copy link

It seems like the issue only appears when using jupyter lab/notebook with Safari (Version 17.3.1 )

I called the same jupyter server with Chrome (Version 122.0.6261.94 ) without any issues.

@krassowski
Copy link
Member

Reopening as the PR #15790 which fixed the inline completer shortcuts conflict was reverted in #15938 because it had a number of unintended side effects. The long-term solution is tracked in #15927

@krassowski krassowski reopened this Mar 7, 2024
@krassowski
Copy link
Member

Just for visibility the workaround for Mac users with international keyboards on JupyterLab 4.1.5 is to paste the following:

{
  "shortcuts": [
    {
      "args": {},
      "command": "inline-completer:next",
      "keys": [
          "Alt ]"
      ],
      "selector": ".jp-mod-completer-enabled",
      "disabled": true
    },
    {
      "args": {},
      "command": "inline-completer:previous",
      "keys": [
          "Alt ["
      ],
      "selector": ".jp-mod-completer-enabled",
      "disabled": true
    },
    {
      "args": {},
      "command": "inline-completer:invoke",
      "keys": [
          "Alt \\"
      ],
      "selector": ".jp-mod-completer-enabled",
      "disabled": true
    }
  ]
}

In: Settings → Settings Editor → JSON Settings Editor → Keyboard Shortcuts → User → paste → save.

I would greatly appreciate if someone could review the fix in #15927 (and the underlying jupyterlab/lumino#689).

@asmaier
Copy link

asmaier commented Mar 30, 2024

It seems like the issue only appears when using jupyter lab/notebook with Safari (Version 17.3.1 )

I called the same jupyter server with Chrome (Version 122.0.6261.94 ) without any issues.

I can confirm, that the issue only seems to appear in Safari (Version 17.3.1 ). When opening the same notebook in Jupyter Lab on Brave Browser (version 1.62.125) I can enter []{} without problems.

@RubTalha

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug os:macos Issues specific to macOS operating system pkg:application tag:Keyboard Compatibility issues with keyboards, including locale-specific and layout-specific issues tag:Regression Behavior that had been broken, was fixed, and is broken again
Projects
None yet