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

More powerful commands for nested-keymaps #89

Open
joshgoebel opened this issue Aug 27, 2022 · 2 comments
Open

More powerful commands for nested-keymaps #89

joshgoebel opened this issue Aug 27, 2022 · 2 comments
Labels
enhancement New feature or request request Feature request

Comments

@joshgoebel
Copy link
Owner

joshgoebel commented Aug 27, 2022

#65 talks about this a bit (somewhere in the log). I'm referring to manual control of exiting (or staying in a keymap). Right now often you're stuck with defaults. Most things exit nested keymaps.

  • A combo match exits the keymap
  • ignoring a key exits the keymap

Many commands also immediately return - preventing them from being used in a sequence, such as ignore_key... So right now: [ignore_key, something_else] is impossible, as ignore_key will terminate the sequence of commands.

I'm considering removing all the "early return" behavior... such that these would all work:

  • [ignore_key, sleep(1)]
  • [ignore_key, no_return_top]
    • [no_return_top, ignore_key] (equivalent to previous)
  • ignore_key (return to top is implied, as it's the default)

I don't think we need a return as that is the default...

You could even write things like:

[ignore_key, K("Ctrl-K")] although it doesn't make a lot of sense. We might reconsider naming is nop (no operation)... or some such.

I know you've written on this before in the other thread, but you could maybe do a quick summary of what is needed here to make your Mac accent character stuff "perfect"...

@joshgoebel joshgoebel added enhancement New feature or request request Feature request labels Aug 27, 2022
@joshgoebel
Copy link
Owner Author

As part of this escape_next_key might need to be redesigned to not use a pseudo-keymap... right now you can't really use escape_next_key inside a keymap becasue doing so also implies exiting the keymap. Are there cases where we might want to escape the next key but remain in a nested keymap?

@RedBearAK
Copy link
Contributor

@joshgoebel

Now this sounds like it might do what I was looking for. Sorry, I wasn't tagged so I didn't notice this thread until today.

Are there cases where we might want to escape the next key but remain in a nested keymap?

I can't... think of any?

I know you've written on this before in the other thread, but you could maybe do a quick summary of what is needed here to make your Mac accent character stuff "perfect"...

Just the ability to do an exit action/macro of commands if a combo is NOT inside an active keymap, and then have the input combo do what it would normally do outside of that keymap, after it triggered the "default" exit action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants