Skip to content

Commit

Permalink
Disable DECKPAM mode behind velocity (#16675)
Browse files Browse the repository at this point in the history
DECKPAM originally tracked in #16506.
Support was added in #16511.
But turns out people didn't expect the Terminal to actually be like,
compliant: #16654

This closes #16654 while we think over in #16672 how we want to solve
this
  • Loading branch information
zadjii-msft committed Feb 6, 2024
1 parent ec91be5 commit 71efdcb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,14 @@
</alwaysEnabledBrandingTokens>
</feature>

<feature>
<name>Feature_KeypadModeEnabled</name>
<description>Enables the DECKPAM, DECKPNM sequences to work as intended </description>
<id>16654</id>
<stage>AlwaysDisabled</stage>
<alwaysEnabledBrandingTokens>
<brandingToken>Dev</brandingToken>
</alwaysEnabledBrandingTokens>
</feature>

</featureStaging>
4 changes: 2 additions & 2 deletions src/terminal/input/terminalInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ try
// the ASCII character assigned by the keyboard layout, but when set
// they transmit SS3 escape sequences. When used with a modifier, the
// modifier is embedded as a parameter value (not standard).
if (_inputMode.test(Mode::Keypad))
if (Feature_KeypadModeEnabled::IsEnabled() && _inputMode.test(Mode::Keypad))
{
defineNumericKey(VK_MULTIPLY, L'j');
defineNumericKey(VK_ADD, L'k');
Expand Down Expand Up @@ -490,7 +490,7 @@ try

// Keypad keys also depend on Keypad mode, the same as ANSI mappings,
// but the sequences use an ESC ? prefix instead of SS3.
if (_inputMode.test(Mode::Keypad))
if (Feature_KeypadModeEnabled::IsEnabled() && _inputMode.test(Mode::Keypad))
{
defineKeyWithUnusedModifiers(VK_MULTIPLY, L"\033?j"s);
defineKeyWithUnusedModifiers(VK_ADD, L"\033?k"s);
Expand Down

0 comments on commit 71efdcb

Please sign in to comment.