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

Keystroke ] not detected on Windows #1841

Closed
3 tasks
bartbroere opened this issue Apr 6, 2023 · 5 comments · Fixed by #1901 or #2563
Closed
3 tasks

Keystroke ] not detected on Windows #1841

bartbroere opened this issue Apr 6, 2023 · 5 comments · Fixed by #1901 or #2563

Comments

@bartbroere
Copy link
Contributor

In Powershell and cmd.exe I encountered that sorting didn't work in both orders. The [ shortcut was detected and had its effect, but the ] didn't. I narrowed it down to a problem with windows-curses, and in turn with its dependency PDCurses: zephyrproject-rtos/windows-curses#41

Here's my plan on how to address it. I hope I'll get around to it somewhere next week.

  • Improve the mapping in PDCurses and submit a pull request
  • Bump the git submodule in windows-curses to the PDCurses version that has the fix and ask/wait for a release of this package
  • Address the issue in this repository, perhaps by pinning windows-curses to a version of at least the newly released package.

I'm making this issue here just to document it and track progress. If you're reading this because you have this issue, I would recommend using WSL instead. (WSL is not an option for me unfortunately).

I didn't include the .vd-file to reproduce this issue. The simplest way to reproduce it is to get a Windows computer, run visidata from Powershell or cmd.exe and sort any column by pressing ].

@bartbroere bartbroere added the bug label Apr 6, 2023
@saulpw
Copy link
Owner

saulpw commented Apr 6, 2023

Thanks for the information, @bartbroere. This is a fascinating bug. Is this perhaps because of a non-US keyboard? I'm surprised (though perhaps I shouldn't be) that Windows is having a problem entering a basic ASCII character in 2023.

@bartbroere
Copy link
Contributor Author

bartbroere commented Apr 7, 2023

Yes, mine is not US standard indeed. I encountered the issue both with the NLD DV (Dutch Dvorak) layout and the NLD INTL (Dutch QWERTY) layout.

The Windows API actually is quite nice, it has virtual key codes so you don't have to deal with the different layouts yourself. (If I understand correctly). The PDCurses project does seem to use this functionality.

I'll keep the updates coming here as I discover more. It's fascinating indeed!

Edit: Fixed wrong statement

@anjakefala
Copy link
Collaborator

@bartbroere identified that it was a regression in 2.3.1 of windows-curses: zephyrproject-rtos/windows-curses#41

anjakefala pushed a commit that referenced this issue May 16, 2023
Fixes #1841.

asottile noticed this was a regression in the last windows-curses release in this issue: zephyrproject-rtos/windows-curses#41
@DavidMatthews83
Copy link

Leaving this here for anyone coming across the issue. Have had the same issue on windows with " and ' not being recognized. reverting back to windows_curses==2.3.0 fixed it

@anjakefala
Copy link
Collaborator

This will be fixed in the next release of VisiData!

Until then, you can pip3 install git+https://github.com:saulpw/visidata.git or pip3 install windows-curses>=2.4.

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