Skip to content

Commit

Permalink
Merge pull request #1579 from contour-terminal/fix/difference_between…
Browse files Browse the repository at this point in the history
…_backtab_and_tab

Send backtab as a key
  • Loading branch information
christianparpart authored Aug 7, 2024
2 parents 7fd2905 + fab81f4 commit b1bf68b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<li>Fixes missing keymapping for numpad (#1325)</li>
<li>Improves handling of constant bell sound spawning</li>
<li>Fixes yW (yank WORD) not working properly in normal mode (#1448)</li>
<li>Fixes key mapping Shift+Tab (#1578)</li>
</ul>
</description>
</release>
Expand Down
4 changes: 2 additions & 2 deletions src/contour/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,9 +1469,9 @@ std::optional<std::variant<vtbackend::Key, char32_t>> YAMLConfigReader::parseKey
std::pair { "SLASH"sv, '/' }, std::pair { "SUBTRACT"sv, '-' },
std::pair { "SPACE"sv, ' ' } };

auto const lowerName = crispy::toUpper(name);
auto const upperName = crispy::toUpper(name);
for (auto const& mapping: NamedChars)
if (lowerName == mapping.first)
if (upperName == mapping.first)
return static_cast<char32_t>(mapping.second);

return std::nullopt;
Expand Down
2 changes: 1 addition & 1 deletion src/contour/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ bool sendKeyEvent(QKeyEvent* event, vtbackend::KeyboardEventType eventType, Term

if (key == Qt::Key_Backtab)
{
session.sendCharEvent(U'\t', physicalKey, modifiers.with(Modifier::Shift), eventType, now);
session.sendKeyEvent(Key::Tab, modifiers.with(Modifier::Shift), eventType, now);
event->accept();
return true;
}
Expand Down

0 comments on commit b1bf68b

Please sign in to comment.