浏览代码

Fix `Tab` key handling in `KeybindTextBox` #248

Ruben 1 月之前
父节点
当前提交
d13027328a
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/PicView.Avalonia/CustomControls/KeybindTextBox.cs

+ 6 - 0
src/PicView.Avalonia/CustomControls/KeybindTextBox.cs

@@ -104,6 +104,12 @@ public class KeybindTextBox : TextBox
     protected override void OnKeyDown(KeyEventArgs e)
     {
         // Disable keyboard behavior #248
+        
+        // Fix tab
+        if (e.Key == Key.Tab)
+        {
+            _ = AssociateKey(e);
+        }
     }
 
     private void OnGotFocus(object? sender, GotFocusEventArgs e)