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

[ESC] triggering "string" #135

Open
caseybasichis opened this issue Aug 23, 2021 · 1 comment
Open

[ESC] triggering "string" #135

caseybasichis opened this issue Aug 23, 2021 · 1 comment
Labels

Comments

@caseybasichis
Copy link

caseybasichis commented Aug 23, 2021

On the verge of hacking into the rlwrap of a DSL I work in.

Is a single hotkey macro like trigger possible?

[ESC] triggering "this_function_alway_si_mistype(ouch)<enter>"

Is this in the scope of rlwrap or should I be looking at the DSL?

Is this the stuff? https://github.com/hanslub42/rlwrap/blob/master/filters/handle_hotkeys

Wisdom for the ill-equipped?

@hanslub42
Copy link
Owner

hanslub42 commented Aug 26, 2021

Looking at this I found a bug (#136) that I need to investigate first.

In the meantime, all this is connected to the fact that ESC, CTRL+x etc are "prefix keys" being used on their own (which is a bad idea anyway, as readline will have to wait if anything follows the prefix)

If you use any other key, e.g. when you put

"\C-k":"this_function_forever_correctly_spelled()" # Use CTRL+k to trigger your string

into your ~/.inputrc, everything should work OK.

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

No branches or pull requests

2 participants