Skip to content

Conversation

Cube707
Copy link
Collaborator

@Cube707 Cube707 commented May 2, 2022

As #71 is quite complex and introduces some braking changes, I also provide this PR to just fixes the immediate problems and roll out a new version to replace the broken Version 3.0.5. This should take care of #75 and the multitude of linked issues on #66 and #71

Changes

This PR reverts the bad PR #65, which broke BACKSPACE for Linux systems as well as making the windows scancode lookuptable more inconsistent (see here and #66).

The wrong BACKSPACE code is addressed by a separate check on the windows side, same for ENTER, which is also different on Windows. The lookuptable is completed with the missing values, fixing the inconsistencies.

I bumped black in the pre-commit-config.yaml as 22.1.0 is broken and would not run

I removed Python 2.7 and pypy from the list of supported version, as it is no longer tested and probably doesn't work. I reverted this as it should be handled as part of the v4 release in my opinion.

Problems

The pre-commit test won't complete, as the if statement contaning all of the windows code is to complex. But as this is only suppoesed to be a quick fix before v4.0 I wound't bother with that.

closes #75
closes #57

This PR broke the BACKSPACE on Linux systems
and introduced further inconsistencies into the codebase
@caphrim007
Copy link

I pulled this PR and verified it works to correct the backspace problem I'm observing in python-inquirer. fancy a merge and release?

@Cube707
Copy link
Collaborator Author

Cube707 commented Jun 25, 2022

as the maintainer is currently not responding, I have prepared a temporary workaround: Whoever need this urgently can install it from my fork by using git+https://github.com/Cube707/[email protected] either in a requirements.txt file or directly from the comandline as:

pip install git+https://github.com/Cube707/[email protected]

it is marked as version 3.0.6-dev0, so it will override a existing 3.0.5 installation but will be overriden by a official version 3.0.6 release (when it's released...).

Cube707 added 5 commits July 24, 2022 16:01
the windows scancodes consist of two bytes, the first denoting a
special scancode and the second being the actual key information.
Previously both bytes where used to calculate the number to look up in a
dictionary, but as only the second byte is actually different, this can
be simplified.

closes #75, closes #66, closes #9, closes #8
the very long "windows only" if statement causes a flake8 warning.
As this will be reworked anyway the warning is ignored
@Cube707 Cube707 merged commit 011e6cb into magmax:master Jul 24, 2022
@Cube707 Cube707 deleted the fix-v3.0.5 branch July 24, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong ‘BACKSPACE’ code on win10
2 participants