Use Windows 10 virtual terminal function instead of eiannone/keyboard #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the Windows platform, the session manager plugin uses the following keyboard library:
https://github.com/eiannone/keyboard
This library is a simple keyboard library and does not support VT-100 escape sequences at all.
Modifying this keyboard library to support VT-100 escape sequences is difficult.
Due to the lack of VT-100 escape sequence support, the session manager plugin cannot utilize the ALT+x and SHIFT+x functions.
On Windows, as part of the functionality added to Windows 10's Windows Terminal, the ENABLE_VIRTUAL_TERMINAL_INPUT flag was added to SetConsoleMode, enabling support for VT-100 escape sequence input and output.
This PR utilizes the ENABLE_VIRTUAL_TERMINAL_INPUT feature to support SSH's native functionality.
Unfortunately, this PR means versions prior to Windows 10 will no longer be supported.
Since Windows 10 is also reaching end-of-life and users are transitioning to Windows 11, this is considered acceptable.
On Unix platforms, eiannone/keyboard is not used, and since this PR also removes its use on Windows platforms, the eiannone/keyboard library can be safely removed.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.