alttab icon indicating copy to clipboard operation
alttab copied to clipboard

Google Chrome's `hotkey/shortcuts` locked or freezes

Open uunnxx opened this issue 2 years ago • 8 comments

Hi there! Let me say thanks to this awesome tool <3!

I'm using i3-wm with

exec_always --no-startup-id alttab -w 1 -fg "#fabd2f" -bg "#141c21" -frame "#fabd2f" -t 128x150 -i 127x64

If I switch between Google Chrome instances (windows), I'm not able to use 'NONE' of the hotkeys/shortcuts unless I'll switch focus manually ( focus left, focus right ) between windows.

i.e.
alt  + tab          tab-switch forward
alt  + shift + tab  tab-switch backwards
ctrl + t            new tab
ctrl + n            new window
ctrl + shift + n    new incognito window
ctrl + w            close window

Does anyone have this problem ?

1. Open google chrome
2. Create some empty tabs ( 'ctrl+t' x3 )
3. Try to switch between them using 'alt+tab' and 'alt+shift+tab'
4. 'ctrl+n' create new window OR 'ctrl+shift+n' create new incognito window
5. Using this tool (alttab) switch back to first chrome window
6. Try some hotkeys

uunnxx avatar Sep 08 '21 01:09 uunnxx

+1, meet the same problem quite recently. It didn't happen before. Basically when you switch from other window to google-chrome via alttab, all the chrome built-in keys does not work (even for pageup/pagedown). But i3 keybinding still works. If you switch window via i3 keybindings, there's no such problem.

ipod825 avatar Sep 09 '21 18:09 ipod825

What do you expect, after all, when pressing Alt-Tab in chrome? Both programs try to consume the event, which one should "win"? Not surprising, that one of them fails in unpredictable way. I don't know, perhaps chrome stops listening to all keyboard events in this case?

sagb avatar Sep 09 '21 20:09 sagb

Does using another keyboard combination in alttab -or- disabling alt-tab in chrome solve the problem?

sagb avatar Sep 09 '21 20:09 sagb

Yes. The issue seems that after switching to chrome, alttab did not release the listener. So any keystroke is not sent to chrome. In fact, I can't even type anything in the address bar so it's like the whole chrome instance is freezed until use switch window and switch back using other i3 keybinding but not alt-tab.

ipod825 avatar Sep 09 '21 22:09 ipod825

If I used chrome, I would try to disable alt-tab shortcut in chrome, because it should not be web browser task. For now I won't fix this, but hints are welcome.

sagb avatar Sep 12 '21 14:09 sagb

You don't have to fix this, I was just curious.

For example, in Firefox everything works as it should, so I asked if anyone else has this problem, or it's just me?

I would try to disable alt-tab shortcut in chrome, because it should not be web browser task.

Chrome has NO hotkeys for alt+tab by default, and it makes sense, I mean I can't use any of the hotkeys available on chrome at all.

ctrl+tab go to next tab ctrl+shift+tab go to previous tab ctrl+t create new tab ctrl+shift+t create new incognito tab ctrl+w close current tab ctrl+shift+w close current window with all tabs available ( like alt+F4 )

uunnxx avatar Sep 12 '21 16:09 uunnxx

The issues is not that the key alt-tab not work in chrome. It's that every single keystroke except alt-tab is not functioning in chrome after switching to the chrome window with alttab. alt-tab only works as alttab listens to it. Chorme does not have a built-in callback for alt-tab so you don't even have something to disable.

ipod825 avatar Sep 13 '21 20:09 ipod825

I have no idea why.

sagb avatar Sep 22 '21 18:09 sagb