Skip to content

Commit

Permalink
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Nov 21, 2024
2 parents 27e6a61 + fa220c9 commit 0753d73
Show file tree
Hide file tree
Showing 11 changed files with 1,600 additions and 1,486 deletions.
9 changes: 7 additions & 2 deletions Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1725,8 +1725,13 @@ private KeyCode MapKey (WindowsConsole.ConsoleKeyInfoEx keyInfoEx)
}
}

// Return the Key (not KeyChar!)
return (KeyCode)keyInfo.Key;
// If KeyInfo.Key is A...Z and KeyInfo.KeyChar is not a...z then we have an accent.
// See https://github.com/gui-cs/Terminal.Gui/issues/3807#issuecomment-2455997595
if (keyInfo.KeyChar <= (char)'z')
{
return (KeyCode)keyInfo.Key;
}
return (KeyCode)keyInfo.KeyChar;
}

// Handle control keys whose VK codes match the related ASCII value (those below ASCII 33) like ESC
Expand Down
Loading

0 comments on commit 0753d73

Please sign in to comment.