Skip to content

Commit fec8e2b

Browse files
committed
Change weight adjust to use cmd on macos
1 parent 072d167 commit fec8e2b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
88
## v2.14.1
99
### Changed
1010
- Updated Inference Extra Networks (Lora / LyCORIS) base model filtering to consider SDXL variations (e.g., Noob AI / Illustrious) as compatible, unrecognized models or models with no base model will be considered compatible.
11+
- Changed hotkey for Inference prompt weight adjustment to (`⌘+Up`/`⌘+Down`) on macOS
1112
### Fixed
1213
- Fixed Inference hotkey weight adjustment multi-line behavior, now works as expected like the first line.
1314
- Fixed updates to versions with commit hash version parts not being recognized when the current version has no commit hash part.

StabilityMatrix.Avalonia/Behaviors/TextEditorWeightAdjustmentBehavior.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using NLog;
88
using StabilityMatrix.Avalonia.Extensions;
99
using StabilityMatrix.Avalonia.Models.TagCompletion;
10+
using StabilityMatrix.Core.Helper;
1011
using StabilityMatrix.Core.Models.PromptSyntax;
1112
using TextMateSharp.Grammars;
1213

@@ -86,7 +87,10 @@ protected override void OnDetaching()
8687

8788
private void TextEditor_KeyDown(object? sender, KeyEventArgs e)
8889
{
89-
if (!e.KeyModifiers.HasFlag(KeyModifiers.Control) || e.Key is not (Key.Up or Key.Down))
90+
// Control for Win / Cmd for macOS
91+
var modifier = Compat.IsMacOS ? KeyModifiers.Meta : KeyModifiers.Control;
92+
93+
if (!e.KeyModifiers.HasFlag(modifier) || e.Key is not (Key.Up or Key.Down))
9094
return;
9195

9296
e.Handled = true;

0 commit comments

Comments
 (0)