We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
char.IsLetterOrDigit
[Fact] public void Text_Change_Sets_HotKey () { var view = new View () { HotKeySpecifier = new Rune ('_'), Text = "_Title!" }; Assert.Equal (Key.T, view.HotKey); view.Text = "T_itle!"; Assert.Equal (Key.I, view.HotKey); // BUGBUG: '!' should be supported. Line 968 of TextFormatter filters on char.IsLetterOrDigit //view.Text = "Title_!"; //Assert.Equal (Key.D1 | Key.ShiftMask, view.HotKey); }
I can see no reason for this limitation.
The text was updated successfully, but these errors were encountered:
Fixed in #2927
new code in TextFormatter.FindHotKey:
Updated unit tests:
[Theory] //[InlineData ("_\"k before", false, Key.Null)] // BUGBUG: Not sure why this fails [InlineData ("\"_k before", true, Key.K)] [InlineData ("_`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?", true, (Key)'`')] [InlineData ("`_~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?", true, (Key)'~')] //[InlineData ("`~!@#$%^&*()-__=+[{]}\\|;:'\",<.>/?", true, (Key)'_')] // BUGBUG: Not sure why this fails [InlineData ("_ ~ s gui.cs master ↑10", true, (Key)'')] // ~IsLetterOrDigit + Unicode [InlineData (" ~ s gui.cs _ master ↑10", true, (Key)'')] // ~IsLetterOrDigit + Unicode [InlineData ("non-english: _кдать", true, (Key)'к')] // Lower case Cryllic K (к) public void FindHotKey_Symbols_Returns_Symbol (string text, bool found, Key expected) { var hotKeySpecifier = (Rune)'_'; var result = TextFormatter.FindHotKey (text, hotKeySpecifier, false, out int _, out Key hotKey); Assert.Equal (found, result); Assert.Equal (expected, hotKey); } [Theory] [InlineData ("\"k before")] [InlineData ("ak second")] [InlineData ("last k")] [InlineData ("multiple k and r")] [InlineData ("12345")] [InlineData ("`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?")] // punctuation [InlineData (" ~ s gui.cs master ↑10")] // ~IsLetterOrDigit + Unicode [InlineData ("non-english: кдать")] // Lower case Cryllic K (к) public void FindHotKey_Legacy_FirstUpperCase_NotFound_Returns_False (string text) { bool supportFirstUpperCase = true; var hotKeySpecifier = (Rune)0; var result = TextFormatter.FindHotKey (text, hotKeySpecifier, supportFirstUpperCase, out int hotPos, out Key hotKey); Assert.False (result); Assert.Equal (-1, hotPos); Assert.Equal (Key.Null, hotKey); }
Sorry, something went wrong.
No branches or pull requests
I can see no reason for this limitation.
The text was updated successfully, but these errors were encountered: