HotSwitch icon indicating copy to clipboard operation
HotSwitch copied to clipboard

Shortcuts assigned to wrong windows

Open uhkeller opened this issue 5 years ago • 3 comments

When I try to assign shortcuts to windows belonging to LibreOffice and RStudio, the shortcuts are often assigned to other windows belonging to the same application. I haven't checked if this is limited to only these two applications. I'm on macOS 10.14.6.

Here is the HowSwitch window after I press space on an entry: 1 after pressing space

Then I press a but the shortcut is assigned to the window below: 2 after pressing b

Now I try again and press space and b, now the assignment works. 3 after pressing space and b again

But it gets weirder. Now I want to delete the a shortcut. I press the down arrow… 4 before pressing delete

And press delete. Now the shortcut of the window above disappears, and the current window's shortcut switches to the one the window above used to have. 5 after pressing delete

uhkeller avatar Jun 10 '20 16:06 uhkeller

Thank you for your report. That is a known issue, but the fixing is a bit difficult. It causes on any apps.

I note the cause below.


Setting key is related with order by generated windows.

Scene 1

  • Old window A on Chrome (registered key: none)
  • New window B on Chrome (registered key: none)

Whether you set key with window A or B, the key is registered with OLD window A.

Scene 2

  • Old window A on Chrome (registered key: X)
  • New window B on Chrome (registered key: none)

When the key was already registered with old window, you can finally register a key with new window.

Scene 3

  • Old window A on Chrome (registered key: X)
  • New window B on Chrome (registered key: Y)

So, you cannot register a key only with new window without old one.

Invalid scene (impossible)

  • Old window A on Chrome (registered key: none)
  • New window B on Chrome (registered key: Y)

That is because the registered keys is saved by simple array structure. The array key is related with window in order from the oldest. So, when the scene 3, the key is saved by [X, Y] . If the key Y is deleted, the key array would be [X] .

Scene 4

  • Old window A on Chrome (registered key: Y) (X was changed to Y)
  • New window B on Chrome (registered key: none)

To fix the issue, changing key saving structure is required. That is why the solving it is a bit difficult.

oniatsu avatar Jun 13 '20 07:06 oniatsu

I fixed this on HotSwitch-HS. HotSwitch-HS is a substitution of HotSwitch.

oniatsu avatar Nov 04 '21 16:11 oniatsu

Just to confirm that it works much better now in HotSwitch-HS. Some minor issues persist that I will report over there. Thanks!

uhkeller avatar Nov 05 '21 08:11 uhkeller