-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Feature Request: global hotkey to re-run last command #2809
Comments
Okay so what you're actually asking for is two things:
The second part I've already discussed as a part of #2046, so I'm not gonna delve into that too far. I think that's a fine idea, and I'm totally on board. Might need some modification to support VKEYs as input, not just characters, but we can work that out. The first part might be trickier. It certainly plays into discussion being had in #653. My real question is this: if you have multiple Terminal windows open, which one should the hotkey activate? Do they all get the hotkey's activation? I'd be worried that this is dependent upon having #2080 and it's associated work finished, as we'll need to have a single manager process to be able to send global hotkeys to, that can then dispatch them to the appropriate Terminal instance. |
Yes that sounds exactly right. To answer your question: I'd expect the terminal that was last focused to receive the signal. There might be use cases for sending the signal to all terminals, perhaps this can be a setting. But I think it would be intuitive to send it to the last focused terminal by default. |
How would this work if you have a heavily modified bash profile? |
If the terminal can just send in the up arrow key command then it's up to bash to decide what to do with it. But this would be configurable in whatever way the user requires with #2046 |
Are there any concerns with input-stealing? Or focus-stealing? |
Description of the new feature/enhancement
I would really like to see the ability to bind a global hotkey to repeat the last command in the visible terminal. In essence all it does is:
up arrow
andenter
on the terminal that is visible. Should work even when terminal has no focus since I'm pressing this global hotkey when I'm not in the terminal.Global hotkeys should be bindable to any key, including special keys such as Scroll Lock, Pause/Break and the Context Menu (the button next to the right CTRL).
iTerm2 has this functionality and no other terminal emulator I've tried has this, on Linux or Windows. I'm sure this is achievable with AutoHotkey but I'd prefer native functionality.
Use case for me:
When testing or running experimental scripts, it is common to rerun your script every time you make a change. It is very productive for me if I don't need to take my hands off the keyboard for this. Personally I would bind this functionality to the "context menu" key (between CTRL and Windows), since I never use that button anyway.
The text was updated successfully, but these errors were encountered: