Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitako blocks forward & backwards actions of Logitech mouse #154

Closed
razbensimon opened this issue Jun 14, 2021 · 7 comments
Closed

Gitako blocks forward & backwards actions of Logitech mouse #154

razbensimon opened this issue Jun 14, 2021 · 7 comments

Comments

@razbensimon
Copy link

I have a very strange issue for a long time now.
For some reason, suddenly my forwards & backwards buttons in my mouse stopped work.
Today I realized that gitako extension is the reason why.

before gitako render its DOM element, the buttons work fine.
image
after the render complete, it blocks the events of forward & backwards.
In addition, I tried to disable the extension and it worked too.

Can you identify the issue? I really like this extension but it makes me crazy that I must click chrome's UI buttons to make a trigger for forward/backwards action.

@EnixCoda
Copy link
Owner

Hi @razbensimon

Gitako does capture browser history manipulation events(backward, forward, etc) to enable PJAX to optimize your navigating experience.

Generally, your mouse's buttons that trigger forwards&backwards are mapped to some keyboard shortcuts. Could you inspect what the shortcut is using the mouse's utility software? So that I can make further investigations.

@razbensimon
Copy link
Author

@EnixCoda thanks for the quick response.

Generally, my mouse has just Forward & Back triggers - which I don't know how chrome translate.
image

But gitako blocks it even with a workaround that I tried - I re-mapped those buttons to do Cmd + ArrowLeft & Cmd + ArrowRight respectively. Those the chrome's shortcuts for Back & Forward.

  • note that the Mac CMD button is a Meta button on js.

@EnixCoda
Copy link
Owner

Thank you! I can reproduce it issue now.

Cmd + ArrowLeft & Cmd + ArrowRight would be blocked when the sidebar is focused in order to allow navigating between sidebar file tree items. And the sidebar would be focused after redirecting. But the behavior was not expected to happen when the sidebar is not expanded.🤔

I will optimize the logic of this part.

BTW, I have made a simple page for inspecting the key. You can focus on the input field and press the buttons to see what keys they are mapped to. Please let me know if they are not Cmd + ArrowLeft/ArrowRight
https://jt50f.csb.app/

@EnixCoda EnixCoda added the bug label Jun 14, 2021
@razbensimon
Copy link
Author

But the behavior was not expected to happen when the sidebar is not expanded.🤔

True. thanks.

And your 'keypress' listener works as expected when I force map the mouse button to execute a keyboard shortcut:
image.

Maybe if you fix it I can live with that, but it is a workaround. Hopefully it will fix also the "real" mouse button triggers.
(I cant test it with your code - Forward triggers nothing, no 'keypress' event. and Back makes chrome go back 😆 )

@razbensimon
Copy link
Author

So i think i found a lead here.
https://sensible-side-buttons.archagon.net/ (look at Technical Notes section)

Very interesting implementation of Logitech Back & Forward. Looks like it just fake mac swipe gestures - so no keypress event. so you can probably debug with it if you don't have MX Master.

@EnixCoda
Copy link
Owner

EnixCoda commented Jun 15, 2021

Interesting technical insights of the tool!

so no keypress event

If so, my assumption on the keypress event capturing should be wrong.

I'll make more investigation with the tool. Thank you very much! 😃

@EnixCoda EnixCoda changed the title Bug: gitako blocks chrome forward & backwards actions Gitako blocks forward & backwards actions of Logitech mouse Jul 20, 2022
@EnixCoda
Copy link
Owner

I got a Logitech G703 recently and its default side button actions are back & forward navigation. Those buttons are not mapped to key press actions so I believe they are also implemented with swipe gestures like https://sensible-side-buttons.archagon.net/ as introduced.
The buttons worked well on all sites I tested including github.com with Gitako enabled. I believe this issue should have been fixed.

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

No branches or pull requests

2 participants