Skip to content

Move CharToKeyEvents (and friends) into InteractivityBase#9106

Merged
DHowett merged 1 commit intomainfrom
dev/duhowett/move_vtredir_up
Feb 11, 2021
Merged

Move CharToKeyEvents (and friends) into InteractivityBase#9106
DHowett merged 1 commit intomainfrom
dev/duhowett/move_vtredir_up

Conversation

@DHowett
Copy link
Member

@DHowett DHowett commented Feb 10, 2021

These functions have a dependency on the "VT Redirected" versions of
VkKeyScanW, MapVirtualKeyW and GetKeyState. Those implementations depend
on the service locator and therefore the entire interactivity stack.

This meant that anybody depending on just Types had to pull in the
entire host
worth of dependencies (!).

Since these functions are only used in places where we have or are
testing interactivity, it makes sense to consolidate them here.

Closes #9105.

@ghost ghost added Area-Build Issues pertaining to the build system, CI, infrastructure, meta Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase labels Feb 10, 2021
@DHowett DHowett requested a review from miniksa February 10, 2021 21:18
@DHowett
Copy link
Member Author

DHowett commented Feb 10, 2021

This unblocks inbox.

WORD CharType = 0;
GetStringTypeW(CT_CTYPE3, &wch, 1, &CharType);

if (WI_IsFlagSet(CharType, C3_ALPHA) || GetQuickCharWidth(wch) == CodepointWidth::Wide)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is highly suspect -- the width of a character should not impact its encoding in key events. HOWEVER: this is NOT NEW CODE and I WILL NOT FIX IT HERE.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, don't fix it. But you're right. The width... shouldn't... ughhhhhh.

@DHowett
Copy link
Member Author

DHowett commented Feb 10, 2021

Pushing a revision that renames the new file from convert to EventSynthesis

These functions have a dependency on the "VT Redirected" versions of
VkKeyScanW, MapVirtualKeyW and GetKeyState. Those implementations depend
on the service locator and therefore the entire interactivity stack.

This meant that anybody depending on just Types had to pull in **the
entire host** worth of dependencies (!).

Since these functions are only used in places where we have or are
testing interactivity, it makes sense to consolidate them here.
@DHowett DHowett force-pushed the dev/duhowett/move_vtredir_up branch from 4401d97 to efd8ccf Compare February 10, 2021 21:27
@DHowett DHowett merged commit 8f73145 into main Feb 11, 2021
@DHowett DHowett deleted the dev/duhowett/move_vtredir_up branch February 11, 2021 01:10
DHowett added a commit that referenced this pull request Feb 11, 2021
These functions have a dependency on the "VT Redirected" versions of
VkKeyScanW, MapVirtualKeyW and GetKeyState. Those implementations depend
on the service locator and therefore the entire interactivity stack.

This meant that anybody depending on just Types had to pull in **the
entire host** worth of dependencies (!).

Since these functions are only used in places where we have or are
testing interactivity, it makes sense to consolidate them here.

(cherry picked from commit 8f73145)
DHowett added a commit that referenced this pull request Feb 11, 2021
Dustin L. Howett (3)
* Move CharToKeyEvents (and friends) into InteractivityBase (GH-9106)
* Update Cascadia Code to 2102.03 (GH-9088)
* verison: bump to 1.7 on main

Josh Soref (1)
* ci: update to Spell check to 0.0.17a (CC-9014)

Leonard Hecker (3)
* Fixed GH-5205: Ctrl+Alt+2 doesn't send ^[^@ (CC-5272)
* Fix issues in tests.xml and OpenConsole.psm1 (CC-9011)
* Fix GH-8458: Handle all Ctrl-key combinations (CC-8870)

Mike Griese (1)
* Add support for running a commandline in another WT window (GH-8898)

Michael Niksa (1)
* Teach the renderer to keep thread alive if engine requests it (GH-9091)

Lachlan Picking (1)
* Fix shader time input (CC-8994)

PankajBhojwani (1)
* Separate runtime TerminalSettings from profile-TerminalSettings (CC-8602)

Chester Liu (2)
* Add support for paste filtering and bracketed paste mode (CC-9034)
* Add support for chaining OSC 10-12 (CC-8999)

Related work items: MSFT-31692939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Build Issues pertaining to the build system, CI, infrastructure, meta Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Types is not bottom-clean; has a dependency on the entire interactivity stack!

3 participants