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

Remove motion remap #705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove motion remap #705

wants to merge 1 commit into from

Conversation

DogLooksGood
Copy link
Collaborator

@DogLooksGood DogLooksGood commented Dec 25, 2024

This is an attempt to remove the rebinding in motion state. An idea of transparent motion is introduced to achieve the same effect.

It adds a variable meow-keypad-leader-transparent which accepts t, motion, normal and nil. The default value is motion which means only in motion mode, the leader is transparent. Therefore, we no longer need the rebind to H-*, any free key on leader can be used to execute the original command.

NB: This will be a breaking change.

@Haxxflaxx
Copy link
Contributor

It works well for me in accessing overridden keys in motion state. Are we hoping for this to be able to do self insertions or will we require to explicitly bind them in the future?

Right now the meow-keypad-leader-transparent for normal state doesn't do what I would have expected, i assume we would need to have some fallback: look up the key in current-local-map, if it is not bound there, look it up in the global map instead.

I think we would still need to set last-input-event and last-command-event.

@DogLooksGood
Copy link
Collaborator Author

Yep, I expect this to support self-insert-command as well. So it's not finished yet.

@okamsn
Copy link
Contributor

okamsn commented Dec 27, 2024

With these changes, would there be a built-in way to support triggering the original key binding with a separate key in the Motion state? If not, would you be willing to add a helper command that runs the binding outside of the Meow maps, such as using the code added to meow--keypad-try-execute in this pull request?

Then, such a helper command could be used directly, maybe in meow--keypad-try-execute, or wrapped and passed events or key sequences.

I think having such a command, that would need to be bound by the user, would cover the old behavior without interfering with this new proposed behavior.

@DogLooksGood
Copy link
Collaborator Author

@okamsn

I think we can add a command to achieve this.

@Haxxflaxx
Copy link
Contributor

I haven't really looked at how the remapping of keys works internally but I have a couple of keypad binds like '("p" . "C-x p"), I would expect binding something like '("l" . "L") to send 'L' when pressing 'l' in the keypad.
But maybe it's hard to reuse this functionality for that sort of rebinding.

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

Successfully merging this pull request may close these issues.

3 participants