holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.63k stars 505 forks source link

VS Code TextInput acting as if Control Button is Pressed #4064

Open 17donj opened 1 year ago

17donj commented 1 year ago

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc) Panel version 0.14.0a23 as 0.14.0a24 cannot be installed Using the latest version of vscode jupyter-bokeh 3.0.5 ipywidgets 8.0.2 jupyter_core 4.11.2 Windows 10

Issue

When using the TextInput widget, any key press acts as if the button control is also being pressed For example, when entering the \ keystroke it acts as it \+\ has been pressed and opens up a text search in vscode Only occurs when using a jupyer notebook within vscode and not on a jupyter server

Occurs with both pn.extension() and pn.extension(comms="vscode")

Have tried upgrading everything to the latest versions but did not solve the problem

import panel as pn
pn.extension()

from panel.widgets.input import TextInput
test = TextInput()
test

then try and enter any keystroke with an associated shortcut

Screenshot 2022-10-28 120205

Hendrix1369 commented 1 year ago

I've had this same issue for months and not sure why. Looking around on SO it seems like this is still unresolved...

I've had to move from VS code back to Jupyter notebook because VS code seems incompatible with this which is extraordinarily frustrating...

17donj commented 1 year ago

From a bit more investigating, I found that it has nothing to do with the control button. The focus on the widget isn't capturing the text input so it is also going to vscode and getting interpreted as a notebook shortcut "f" is for notebook: find. This doesn't happen using ipywidgets but does occur with Bokeh Workaround: Disable the Jupyter Keymap Extension