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

Arrow keys do not work in menuconfig (VSCode terminal & Windows Terminal Preview) (IDFGH-1860) (VSC-170) #6

Closed
kaofishy opened this issue Sep 15, 2019 · 16 comments
Labels
stale Stale PR or Issue vscode related problem This issue is related to the bug/ behaviours of the vscode and not the extension itself

Comments

@kaofishy
Copy link

Environment

  • IDF version (run git describe --tags to find it):
    v4.1-dev-256-g9f145ff16
  • Build System: CMake
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0
  • Operating System: Windows 10

Problem Description

When using idf.py menuconfig in a Visual Studio Code integrated terminal or a Windows Terminal Preview terminal, the arrow keys do not work as menu navigation. This does not occur under regular Windows terminal.

Expected Behavior

Arrow keys navigate the menu items

Actual Behavior

The menu does not respond to arrow keys

Steps to repropduce

  1. Install Visual Studio Code or Windows Terminal Preview
  2. Run idf.py menuconfig in a project within the Visual Studio Code integrated terminal or a Windows Terminal Preview session
  3. Use arrow keys to navigate the menu
@github-actions github-actions bot changed the title Arrow keys do not work in menuconfig (VSCode terminal & Windows Terminal Preview) Arrow keys do not work in menuconfig (VSCode terminal & Windows Terminal Preview) (IDFGH-1860) Sep 15, 2019
@versamodule
Copy link

Works for me.

@kaofishy
Copy link
Author

Works for me.

Did you try it with Windows Terminal Preview https://github.com/microsoft/terminal and the latest git IDF? I am using the CMake Python-based menuconfig and not the old lxdialog menuconfig.

@versamodule
Copy link

versamodule commented Sep 16, 2019 via email

@kaofishy
Copy link
Author

kaofishy commented Sep 16, 2019

Yes of course, and this occurs under both VSCode's integrated terminal and the Windows Terminal Preview, but not under regular conhost.exe command prompt.

Interestingly if I build the IDF under WSL then the arrow keys work under both terminals, which suggests to me it's something to do with mconf-idf under Windows since the Windows mconf is built differently from the other platforms (from what I can gather from the repo it uses PDCurses instead of ncurses).

Did you move you mouse onto the terminal window and left click first
before you tryed to use the cursor keys.

Sincerely,

Jimp@Versamodule.com

On 9/16/2019 11:54 AM, Tony Kao wrote:

 Works for me.

Did you try it with Windows Terminal Preview
https://github.com/microsoft/terminal and the latest git IDF? I am
using the CMake Python-based menuconfig and not the old lxdialog
menuconfig.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4067?email_source=notifications&email_token=ABRIKTD34V2HFMGXKA7FOFLQJ622RA5CNFSM4IW4JHUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ZZNCQ#issuecomment-531863178>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABRIKTCEYDGCCJWVUCGWRVDQJ622RANCNFSM4IW4JHUA.

@kaofishy
Copy link
Author

After some more tests, I've definitively isolated the issue to PDCurses on Windows when using a non-conhost.exe terminal. I compiled demo programs for PDCurses and I am able to reproduce the same issue: arrows work under regular conhost.exe but not any other terminal on Windows.

I used MinGW and source from this git repo https://github.com/wmcbrine/PDCurses

@kaofishy
Copy link
Author

I have created a pull request to fix this issue in kconfig-frontend, see espressif/kconfig-frontends#1

@Devenda
Copy link

Devenda commented Oct 20, 2019

Is there any workaround for this?

@versamodule
Copy link

I'm new to the VSCode thing, so I many not clearly understand. But I ran into this issue too. What fixed it for me was to set the integrated terminal to bash.
"terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe"

@Devenda
Copy link

Devenda commented Dec 29, 2019

After updating to the latest version of esp-idf, even the rendering in vscode is broken.
Even though the menu is hard to use, the j and k keys seems to navigate the menu correctly.

Hoping more is known about this, a new issue is made about both issues: #5

Currently using bash is not really feasible in my setup.

@projectgus projectgus transferred this issue from espressif/esp-idf Jan 7, 2020
@projectgus
Copy link

(Moving this into VSCode Extension because even though the extension isn't responsible for this, it seems like any fix will probably need to come via the extension.)

@github-actions github-actions bot changed the title Arrow keys do not work in menuconfig (VSCode terminal & Windows Terminal Preview) (IDFGH-1860) Arrow keys do not work in menuconfig (VSCode terminal & Windows Terminal Preview) (IDFGH-1860) (VSC-170) Jan 7, 2020
@projectgus
Copy link

(Note also that the extension provides a UI config editor, so that may be a better solution than debugging VSCode's interactive terminal support.)

@pwmb
Copy link
Contributor

pwmb commented Jan 7, 2020

@kaofishy Since we don't have control over the terminal inside the vscode directly, for this reason in the ESP IDF Official VSCode Extension we have provided support for the Menuconfig, use that instead.

Visit the extension marketplace to know more.

@pwmb pwmb added the vscode related problem This issue is related to the bug/ behaviours of the vscode and not the extension itself label Jan 7, 2020
@pwmb pwmb added the stale Stale PR or Issue label Jan 21, 2020
@pwmb pwmb closed this as completed Jan 21, 2020
brianignacio5 added a commit that referenced this issue Mar 26, 2020
* Added a custom Debug Adapter

* fix old configs remove build before debug

* fix debug adapter unit test

* DA python pkgs check (#3)

* read Cmakelists file for project name (VSC-248) (#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (#48)

* v0.1.4

* Added a custom Debug Adapter

* fix old configs remove build before debug

* removed outdated extension.test.ts

* fix debug adapter unit test

* removed repeated options

* removed redundant requirements.txt

* made `Upload testing.results.log` always executable

* add adapter python reqs checking

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
Co-authored-by: Andrey Gramakov <mail@agramakov.me>

* Fix/da merge (#4)

* read Cmakelists file for project name (VSC-248) (#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (#48)

* v0.1.4

* Added a custom Debug Adapter

* fix old configs remove build before debug

* fix debug adapter unit test

* DA python pkgs check (#3)

* read Cmakelists file for project name (VSC-248) (#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (#48)

* v0.1.4

* Added a custom Debug Adapter

* fix old configs remove build before debug

* removed outdated extension.test.ts

* fix debug adapter unit test

* removed repeated options

* removed redundant requirements.txt

* made `Upload testing.results.log` always executable

* add adapter python reqs checking

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
Co-authored-by: Andrey Gramakov <mail@agramakov.me>

* fix merge issues

* log adapter output

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
Co-authored-by: Andrey Gramakov <mail@agramakov.me>

* An dr/feature/debug adapter (#5)

Fix Espressif master merge conflicts

* debug_backend package: removed everything but pygdbmi from the Pipfile

* Fix/da conflict (#6)

* read Cmakelists file for project name (VSC-248) (#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (#48)

* v0.1.4

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>

* Run prettier

* yarn audit fix

Co-authored-by: brian@espressif.com <brian@espressif.com>
Co-authored-by: Brian A. Ignacio <brianignacio5@gmail.com>
Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
pwmb added a commit that referenced this issue May 18, 2020
@positron96
Copy link

For what it's worth, my workaround is to exec start from inside VS Code terminal, which opens a normal Windows terminal, and call pio run -t menuconfig from there.

@JonathanDotCel
Copy link

JonathanDotCel commented Oct 9, 2021

Just to add to @positron96 's solution. If VSCode is using a powershell terminal then you must do e.g. start cmd
then idf.py menuconfig
(For the oldschool terminal, just start will work without the cmd part)

@mike6000
Copy link

I opened a windows terminal with Windows + R and typing cmd
Then running pio run -t menuconfig worked fine for me
(Make sure that pio is in your PATH)

@Zeni241
Copy link

Zeni241 commented Jan 15, 2023

I used start idf.py menuconfig , it opened menuconfig in a new detached terminal window where all the keys works!! I am using powershell as terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PR or Issue vscode related problem This issue is related to the bug/ behaviours of the vscode and not the extension itself
Projects
None yet
Development

No branches or pull requests

9 participants