Skip to content

Commit 3fe11ed

Browse files
committed
Don't allow mouse repeats with switch
1 parent cfd55c7 commit 3fe11ed

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/JuliusSweetland.OptiKey.Core/UI/ViewModels/MainViewModel.ServiceEventHandlers.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,14 @@ private void ProcessBasicKeyValue(KeyValue singleKeyValue)
355355

356356
// Inject previous keyvalue if asked to repeat
357357
if (singleKeyValue.FunctionKey != null &&
358-
singleKeyValue.FunctionKey == FunctionKeys.RepeatLastKeyAction)
359-
{
360-
singleKeyValue = lastKeyValueExecuted;
358+
singleKeyValue.FunctionKey == FunctionKeys.RepeatLastKeyAction &&
359+
SelectionMode == SelectionModes.Keys)
360+
{
361+
// We could consider allowing this to repeat the last mouse action, or
362+
// to repeat the original mouse-related key, but we're not sure how useful
363+
// it would be
364+
if (!lastMouseActionStateManager.LastMouseActionExists)
365+
singleKeyValue = lastKeyValueExecuted;
361366
}
362367

363368
keyStateService.ProgressKeyDownState(singleKeyValue);

0 commit comments

Comments
 (0)