Skip to content

Commit a5c7b1d

Browse files
flexxxxerflexxxxer
authored andcommitted
issue fix
1 parent 9ba9414 commit a5c7b1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Avalonia.Controls/HotkeyManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ static HotKeyManager()
149149
return;
150150

151151
var control = args.Sender as Control;
152-
if (control is not IClickableControl)
152+
if (control is not IClickableControl and not ICommandSource)
153153
{
154154
Logging.Logger.TryGet(Logging.LogEventLevel.Warning, Logging.LogArea.Control)?.Log(control,
155-
$"The element {args.Sender.GetType().Name} does not implement IClickableControl and does not support binding a HotKey ({args.NewValue}).");
155+
$"The element {args.Sender.GetType().Name} does not implement IClickableControl nor ICommandSource and does not support binding a HotKey ({args.NewValue}).");
156156
return;
157157
}
158158

0 commit comments

Comments
 (0)