microsoft / microsoft/terminal

Feature Request: global hotkey to re-run last command

Open
#2,809 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-UserInterface Help Wanted Issue-Feature Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

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 and enter 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Begin by locating the terminal's command-history handling and global key-binding or input registration paths, then verify that a configurable unfocused hotkey repeats the last command in the visible terminal, including the requested special keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.