Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriain holmes <iaholmes@microsoft.com>2022-02-23 18:11:30 +0300
committeriain holmes <iaholmes@microsoft.com>2022-02-23 18:11:30 +0300
commit4ddc9e41e95cc68064a924cdb69ceb3e679ec3f9 (patch)
tree4b4241106d891514cd344b0a1a431e076ffd00aa
parentd82032a1a33e01b3a35d083633ca9e90ac537b90 (diff)
Cocoa passes ctrl+i as a tab key, so check that Characters is not whitespace
before using it
-rw-r--r--Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs b/Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs
index 0ce60994..ce93fe93 100644
--- a/Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs
+++ b/Xwt.XamMac/Xwt.Mac/KeyboardUtil.cs
@@ -128,7 +128,7 @@ namespace Xwt.Mac
// If you press the cmd+м on the keyboard, keyEvent.Characters contains a 'v' and keyEvent.CharactersIgnoringModifiers
// contains the м
// This way it can map cmd+м to paste like on a roman keyboard.
- var characters = keyEvent.Characters;
+ var characters = string.IsNullOrWhiteSpace(keyEvent.Characters) ? keyEvent.CharactersIgnoringModifiers : keyEvent.Characters;
if (characters.Length > 0)
switch (characters[0]) {
case 'A': return Key.a;