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

Is there any way to quickly switch between mappings (via cli, etc) or to have conditional mapping applied? #56

Closed
MostHated opened this issue Mar 11, 2021 · 1 comment

Comments

@MostHated
Copy link

Hey there,
I am wondering if there is any way to quickly switch between mappings or to have conditional mapping? An example being, if I were to somehow monitor my currently focused window (perhaps AutoKey, or some other application that runs in the background?) and it is detected that I have VSCode focused, apply X mapping to the mouse, if anything else is focused, go back to default, or some other mapping.

The reason being, I want to use Middle Mouse in VSCode to "jump to definition" as it does in Jetbrains IDE's, but VSCode doesn't allow you to bind the mouse, (or at least, it doesn't work right) but I want the middle mouse to function as it does in say, Firefox or other application as it normally would for closing tabs or scrolling.

I am able to do this just fine on Windows using AutoHotKey (though, with AHK, I was able to change functionality not only based on window focus, but also current mouse position within the current window), but unfortunately, I have yet to be able to find a way to do it on Linux. This seems like it might be able to do it if I can switch between mappings when needed.

Thanks,
-MH

@sezanzeb
Copy link
Owner

sezanzeb commented Mar 11, 2021

preset switching based on the focused application is not possible for wayland and depends on writing solutions for each desktop environment: #20

Here is information on the CLI: https://github.com/sezanzeb/key-mapper/blob/main/readme/usage.md#cli, hope that helps

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

No branches or pull requests

2 participants