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

[Question] Can I disable everything and only use EasyClick? #210

Open
neumannjan opened this issue Nov 5, 2023 · 4 comments
Open

[Question] Can I disable everything and only use EasyClick? #210

neumannjan opened this issue Nov 5, 2023 · 4 comments
Labels
question Further information is requested

Comments

@neumannjan
Copy link

neumannjan commented Nov 5, 2023

Question
I am an active user of win, mac and linux. I indeed do switch between all three OSes regularly. In general, I try to make my keyboard shortcut setups on all three systems as close as possible, to be able to switch easily. On Mac I use the app called Homerow. It works as follows: with cmd+shift+spacebar you get EasyClick. With cmd+shift+J you get the ability to scroll windows, which goes away when you press Esc. That's all it does.

It seems that win-vind is the only app to offer me the same capability on Windows. However, even though I'm an avid user of vim, I do feel quite overwhelmed by all the capabilities of win-vind. While it seems that it is a super powerful application and I'd probably benefit from learning it eventually, I don't really want to right now. I'm simply used to the workflow I have already, and it gets me 90% to the ideal, while being near-exactly replicable on all 3 OSes.

Tl;dr is there a way to just use EasyClick and nothing else?

Thanks.

@pit-ray
Copy link
Owner

pit-ray commented Nov 5, 2023

Yes, you can use only the EasyClick feature with the optimized performance.

I show the sample .vindrc in the below.

version tiny
set initmode=i  " Insert mode

" Overwrite default bindings into the dummy <f20> key
imap <esc-left> <f20>
imap <ctrl-]> <f20>
imap <f8> <f20>
imap <esc-down> <f20>

" Define with your favorite bindings.
imap <ctrl-shift-space> <easyclick><click_left>

" Scan UI objects asynchronously  (Optional)
set uiacachebuild

" Hold UI cache for 5 sec. (Optional)
set uiacachebuild_lifetime=5000

" Generate a cache between 0.5 and 2.0 seconds after the operation stops.  (Optional)
set uiacachebuild_staybegin=500
set uiacachebuild_stayend=2000

Firstly, you remove all mapping in the initial mode with map command, which is the same way as Vim. In the sample .vindrc, the initial mode is set to the insert mode. Next, define the mapping for EasyClick with your favorite keys. Optionally, you can use the uiacachebuild option to scan the UI objects asynchronously and efficiently reuse the cache.

Thanks.

@pit-ray pit-ray added the question Further information is requested label Nov 5, 2023
@kwonoj
Copy link

kwonoj commented Nov 12, 2023

@pit-ray This works great, mind if I ask additional questions?

Is there way to control click behavior once entered easyclick mode with certain bindings? I want to either ctrl+click / or normal click once after enabling easyclick, instead of having separate keybindings for easyclick_left vs easyclick_mid (or else).

Also, is there a scroll mode keybindings as well?

@pit-ray
Copy link
Owner

pit-ray commented Nov 12, 2023

@kwonoj
I don't know if I caught your question correctly, but now easyclick is an independent command <easyclick>, not `<easyclick_left>, etc.
https://pit-ray.github.io/win-vind/cheat_sheet/functions/#easyclick

As with Vim, you can define the user-defined sequential command, which allows you to control the behavior after the <easyclick>. For example, map <s-f><s-f> <easyclick><click_right> and so on.

However, functions such as long pressing the control key have not yet been implemented. #41, #69.

Thanks.

@kwonoj
Copy link

kwonoj commented Nov 12, 2023

@pit-ray Thanks for the answer. I'm trying couple to see if it works as intended, so far it looks like I'm misunderstanding or misconfiguration something.

The basic crux I want to achieve are

  • easyclick allows click with kbd combination:
    This option in homerow summarizes the behavior I'm trying to achieve
image

once easyclick combination is entered, this option allows to trigger click only if certain kbd (space / enter in this case). The kbd input can be combined with modifiers, so for example I grabbed an element in the web browser, then ctrl-enter triggers ctrl-click, and normal enter triggers normal click.

  • scroll mode
    a key combination that enables hjkl triggers scroll event until exiting mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants