Ignore modifiers when in LinkHints mode
What command or commands
LinkHints
Would it be possible to ignore modifiers when in LinkHints mode? I admit I have an edge case because of my zmk keyboard with home row modifiers activated. But for the certain keys that also act as shift and control the modifier action is also considered even though it was released shortly before.
For example:
- I activate LinkHints mode and press
eto go to a new page. - Because
ctrlis active while I holdedown and released shortly before I get the new page in a new window. What should have happened it that it should have opened the link in the current window.
I'm thinking the ctrl keyup and e keydown are too close together for Vimium to register?
So would it be possible to either add an option to ignore modifiers in LinkHints mode or maybe improve the timing recognition so this doesn't happen?
Browser and OS
- Browser name: Chrome
- OS name: Linux Vimium C [1.99.99], Google Chrome 114, Linux.
Thank you for a wonderful extension!
Sorry I haven't got why there's a Ctrl key just before the e key.
As for how to respond on Ctrl/Shift/Alt keys in LinkHints mode, Vimium C has a different behavior from Vimium:
- In Vimium C, LinkHints only acts on "
keydown" events of Ctrl/Shift/Alt keys
-
- for example, a
Ctrl keydownevent will change LinkHint's sub-mode; when the Ctrl key gets released, the new mode is still there
- for example, a
-
- while the original Vimium will revert such sub-mode changes on a next Ctrl keyup event
There's no parameter to change this behavior.
Ah, that's too bad because it forces me to go back to Vimium 🙁. But thanks for the explanation!
Hello, as for #992 mentioned a similar issue, now I decide to add a parameter to make LinkHints ignore those modifier keys (on certain conditions).
BTW, why is there a Ctrl key released before e being pressed? And what did you mean by with home row modifiers activated?
It's nice of you to investigate the issue but I have to admit I'm in the minority with this...
The reason ctrl is pressed before e is because e acts as ctrl when held down.
If I press and hold e and then press s it will register ctrl + s.
If I press and release e it will register e. But while e is in the down state ctrl is registered and if nothing else is pressed it will release ctrl and register e.
It's hard to explain. This video does a decent job https://youtu.be/yiwUjLaebuw?t=199 or you can read more about it here: https://precondition.github.io/home-row-mods
It's a feature of programmable keyboards.
ok,thank you for the detailed explanation.
Then, it seems LinkHints should ignore the ctrl key at all (the small time delta is hard to detect using the current architecture of Vimium C).
---Original--- From: @.> Date: Fri, Aug 18, 2023 06:47 AM To: @.>; Cc: "Dahan @.>;"State @.>; Subject: Re: [gdh1995/vimium-c] Ignore modifiers when in LinkHints mode (Issue#988)
It's nice of you to investigate the issue but I have to admit I'm in the minority with this...
The reason ctrl is pressed before e is because e acts as ctrl when held down.
If I press and hold e and then press s it will register ctrl + s.
If I press and release e it will register e. But while e is in the down state ctrl is registered and if nothing else is pressed it will release ctrl and register e.
It's hard to explain. This video does a decent job https://youtu.be/yiwUjLaebuw?t=199 or you can read more about it here: https://precondition.github.io/home-row-mods
It's a feature of programmable keyboards.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Is there any other modifier key (alt/meta/shift) which may be mixed with a letter key?
---Original--- From: @.> Date: Fri, Aug 18, 2023 06:47 AM To: @.>; Cc: "Dahan @.>;"State @.>; Subject: Re: [gdh1995/vimium-c] Ignore modifiers when in LinkHints mode (Issue#988)
It's nice of you to investigate the issue but I have to admit I'm in the minority with this...
The reason ctrl is pressed before e is because e acts as ctrl when held down.
If I press and hold e and then press s it will register ctrl + s.
If I press and release e it will register e. But while e is in the down state ctrl is registered and if nothing else is pressed it will release ctrl and register e.
It's hard to explain. This video does a decent job https://youtu.be/yiwUjLaebuw?t=199 or you can read more about it here: https://precondition.github.io/home-row-mods
It's a feature of programmable keyboards.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
The modifiers that can be used for this are:
- Left Shift
- Right Shift
- Left Control
- Right Control
- Left Alt
- Right Alt
- Left GUI (Windows / Command / Meta)
- Right GUI (Windows / Command / Meta)
Shown here: https://zmk.dev/docs/codes/modifiers