We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Keystroke ] not detected on Windows
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`: https://github.com/zephyrproject-rtos/windows-curses/issues/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 `]`.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #!/usr/bin/env python3
2 
3 from setuptools import setup
4 # tox can't actually run python3 setup.py: https://github.com/tox-dev/tox/issues/96
5 #from visidata import __version__
6 __version__ = '2.12dev'
7 
8 setup(name='visidata',
9       version=__version__,
10       description='terminal interface for exploring and arranging tabular data',
11       long_description=open('README.md').read(),
12       long_description_content_type='text/markdown',
13       author='Saul Pwanson',
14       python_requires='>=3.7',
15       author_email='visidata@saul.pw',
16       url='https://visidata.org',
17       download_url='https://github.com/saulpw/visidata/tarball/' + __version__,
18       scripts=['bin/vd'],
19       entry_points={'console_scripts': [
20           'visidata=visidata.main:vd_cli'
21         ],
22       },
23       py_modules=['visidata'],
24       install_requires=[
25           'python-dateutil',
26           'windows-curses; platform_system == "Windows"',
27           'importlib-metadata >= 3.6',
28       ],
29       packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visidata.apps.vgit', 'visidata.apps.vdsql', 'visidata.desktop'],
30       data_files=[('share/man/man1', ['visidata/man/vd.1', 'visidata/man/visidata.1']), ('share/applications/', ['visidata/desktop/visidata.desktop'])],
31       package_data={'visidata.man': ['vd.1', 'vd.txt'], 'visidata.ddw': ['input.ddw'], 'visidata.tests': ['sample.tsv'], 'visidata.desktop': ['visidata.desktop']},
32       license='GPLv3',
33       classifiers=[
34           'Development Status :: 5 - Production/Stable',
35           'Environment :: Console',
36           'Environment :: Console :: Curses',
37           'Intended Audience :: Developers',
38           'Intended Audience :: Science/Research',
39           'Intended Audience :: System Administrators',
40           'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
41           'Operating System :: OS Independent',
42           'Programming Language :: Python :: 3',
43           'Topic :: Database :: Front-Ends',
44           'Topic :: Scientific/Engineering',
45           'Topic :: Office/Business :: Financial :: Spreadsheet',
46           'Topic :: Scientific/Engineering :: Visualization',
47           'Topic :: Utilities',
48       ],
49       keywords=('console tabular data spreadsheet terminal viewer textpunk'
50                 'curses csv hdf5 h5 xlsx excel tsv'),
51       )
52 
53
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
       py_modules=['visidata'],
       install_requires=[
           'python-dateutil',
-          'windows-curses; platform_system == "Windows"',
+          'windows-curses<2.3.1; platform_system == "Windows"',  #1841
           'importlib-metadata >= 3.6',
       ],
       packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visidata.apps.vgit', 'visidata.apps.vdsql', 'visidata.desktop'],

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -23,7 +23,7 @@\n       py_modules=['visidata'],\n       install_requires=[\n           'python-dateutil',\n-          'windows-curses; platform_system == \"Windows\"',\n+          'windows-curses<2.3.1; platform_system == \"Windows\"',  #1841\n           'importlib-metadata >= 3.6',\n       ],\n       packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visidata.apps.vgit', 'visidata.apps.vdsql', 'visidata.desktop'],\n", "issue": "Keystroke ] not detected on Windows\nIn 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`: https://github.com/zephyrproject-rtos/windows-curses/issues/41\r\n\r\nHere's my plan on how to address it. I hope I'll get around to it somewhere next week.\r\n- [ ] Improve the mapping in `PDCurses` and submit a pull request\r\n- [ ] Bump the git submodule in `windows-curses` to the `PDCurses` version that has the fix and ask/wait for a release of this package\r\n- [ ] Address the issue in this repository, perhaps by pinning `windows-curses` to a version of at least the newly released package.\r\n\r\nI'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).\r\n\r\nI 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 `]`.\n", "before_files": [{"content": "#!/usr/bin/env python3\n\nfrom setuptools import setup\n# tox can't actually run python3 setup.py: https://github.com/tox-dev/tox/issues/96\n#from visidata import __version__\n__version__ = '2.12dev'\n\nsetup(name='visidata',\n      version=__version__,\n      description='terminal interface for exploring and arranging tabular data',\n      long_description=open('README.md').read(),\n      long_description_content_type='text/markdown',\n      author='Saul Pwanson',\n      python_requires='>=3.7',\n      author_email='visidata@saul.pw',\n      url='https://visidata.org',\n      download_url='https://github.com/saulpw/visidata/tarball/' + __version__,\n      scripts=['bin/vd'],\n      entry_points={'console_scripts': [\n          'visidata=visidata.main:vd_cli'\n        ],\n      },\n      py_modules=['visidata'],\n      install_requires=[\n          'python-dateutil',\n          'windows-curses; platform_system == \"Windows\"',\n          'importlib-metadata >= 3.6',\n      ],\n      packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visidata.apps.vgit', 'visidata.apps.vdsql', 'visidata.desktop'],\n      data_files=[('share/man/man1', ['visidata/man/vd.1', 'visidata/man/visidata.1']), ('share/applications/', ['visidata/desktop/visidata.desktop'])],\n      package_data={'visidata.man': ['vd.1', 'vd.txt'], 'visidata.ddw': ['input.ddw'], 'visidata.tests': ['sample.tsv'], 'visidata.desktop': ['visidata.desktop']},\n      license='GPLv3',\n      classifiers=[\n          'Development Status :: 5 - Production/Stable',\n          'Environment :: Console',\n          'Environment :: Console :: Curses',\n          'Intended Audience :: Developers',\n          'Intended Audience :: Science/Research',\n          'Intended Audience :: System Administrators',\n          'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',\n          'Operating System :: OS Independent',\n          'Programming Language :: Python :: 3',\n          'Topic :: Database :: Front-Ends',\n          'Topic :: Scientific/Engineering',\n          'Topic :: Office/Business :: Financial :: Spreadsheet',\n          'Topic :: Scientific/Engineering :: Visualization',\n          'Topic :: Utilities',\n      ],\n      keywords=('console tabular data spreadsheet terminal viewer textpunk'\n                'curses csv hdf5 h5 xlsx excel tsv'),\n      )\n\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n\nfrom setuptools import setup\n# tox can't actually run python3 setup.py: https://github.com/tox-dev/tox/issues/96\n#from visidata import __version__\n__version__ = '2.12dev'\n\nsetup(name='visidata',\n      version=__version__,\n      description='terminal interface for exploring and arranging tabular data',\n      long_description=open('README.md').read(),\n      long_description_content_type='text/markdown',\n      author='Saul Pwanson',\n      python_requires='>=3.7',\n      author_email='visidata@saul.pw',\n      url='https://visidata.org',\n      download_url='https://github.com/saulpw/visidata/tarball/' + __version__,\n      scripts=['bin/vd'],\n      entry_points={'console_scripts': [\n          'visidata=visidata.main:vd_cli'\n        ],\n      },\n      py_modules=['visidata'],\n      install_requires=[\n          'python-dateutil',\n          'windows-curses<2.3.1; platform_system == \"Windows\"',  #1841\n          'importlib-metadata >= 3.6',\n      ],\n      packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visidata.apps.vgit', 'visidata.apps.vdsql', 'visidata.desktop'],\n      data_files=[('share/man/man1', ['visidata/man/vd.1', 'visidata/man/visidata.1']), ('share/applications/', ['visidata/desktop/visidata.desktop'])],\n      package_data={'visidata.man': ['vd.1', 'vd.txt'], 'visidata.ddw': ['input.ddw'], 'visidata.tests': ['sample.tsv'], 'visidata.desktop': ['visidata.desktop']},\n      license='GPLv3',\n      classifiers=[\n          'Development Status :: 5 - Production/Stable',\n          'Environment :: Console',\n          'Environment :: Console :: Curses',\n          'Intended Audience :: Developers',\n          'Intended Audience :: Science/Research',\n          'Intended Audience :: System Administrators',\n          'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',\n          'Operating System :: OS Independent',\n          'Programming Language :: Python :: 3',\n          'Topic :: Database :: Front-Ends',\n          'Topic :: Scientific/Engineering',\n          'Topic :: Office/Business :: Financial :: Spreadsheet',\n          'Topic :: Scientific/Engineering :: Visualization',\n          'Topic :: Utilities',\n      ],\n      keywords=('console tabular data spreadsheet terminal viewer textpunk'\n                'curses csv hdf5 h5 xlsx excel tsv'),\n      )\n\n", "path": "setup.py"}]}