win-vind icon indicating copy to clipboard operation
win-vind copied to clipboard

[Question] Can you diffrentiate between key press and key up?

Open gilbh opened this issue 2 years ago • 4 comments

Hi,

I don't think this exists in vim, but can you distinguish between key press and key up in the key bindings that can be mapped in .vinrc?

If yes, then I would change my binding from:

inoremap <esc> to_edi_normal

to:

inoremap <esc[KEYUP]> to_edi_normal

-- that would go a long way toward ease of use of win-vind, because it will avoid incorrect actions and overlapping mappings, such as switching to other modes, like <esc-up> and so on. Only when the <esc> key press is released (=KEYUP) would it activate the binding....

gilbh avatar Feb 05 '22 12:02 gilbh

This issue was marked as stale because it has been inactive for 60 days. If there are no comments within 14 days, it will be closed automatically.

github-actions[bot] avatar Apr 07 '22 02:04 github-actions[bot]

This issue has been marked as stale, but has not been mentioned for 14 days, so it is closed.

github-actions[bot] avatar Apr 21 '22 03:04 github-actions[bot]

It is possible to implement a distinction, but currently no such functionality is available.

If I only activate when release ESC, does that mean we have to press and hold it at all other times?

Sorry for the late reply.

pit-ray avatar Jun 18 '22 18:06 pit-ray

Some time has passed, so I am not sure now. It seems that my initial request wasn't clearly described: the logic for [KEY-UP] makes sense only if we have also the option of when the is KEY DOWN. This way, KEY-UP would work as general Escape key for all the apps, while the would work for win-vind without a conflict ... I hope this is clear. Let me know.

Best and keep up the great work!!

gilbh avatar Jun 18 '22 23:06 gilbh

This issue was marked as stale because it has been inactive for 60 days. If there are no comments within 14 days, it will be closed automatically.

github-actions[bot] avatar Aug 18 '22 03:08 github-actions[bot]

This issue has been marked as stale, but has not been mentioned for 14 days, so it is closed.

github-actions[bot] avatar Sep 01 '22 03:09 github-actions[bot]