Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Shortcuts assigned to wrong windows #12

Open
uhkeller opened this issue Jun 10, 2020 · 3 comments
Open

Shortcuts assigned to wrong windows #12

uhkeller opened this issue Jun 10, 2020 · 3 comments

Comments

@uhkeller
Copy link

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

@oniatsu oniatsu added the bug label Jun 13, 2020
@oniatsu
Copy link
Owner

oniatsu commented Jun 13, 2020

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
Copy link
Owner

oniatsu commented Nov 4, 2021

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

@uhkeller
Copy link
Author

uhkeller commented Nov 5, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants