Tip&Tech

Windows Terminal - Alt 숫자키로 탭 전환

acidpop 2021. 7. 15. 14:55
반응형

 

Windows Terminal 을 사용하다 보면 여러개의 탭을 열어서 사용할 수가 있다.

탭을 이동을 하기 위해서는 각 탭을 마우스로 클릭을 하거나

Ctrl + Tab

Ctrl + Shift + Tab 단축키를 이용할 수가 있는데

여러 탭이 있는 경우 Alt + 숫자 키를 이용하여 각 탭으로 이동하는 방법을 소개 한다.

 

Terminal 프로그램에서 탭 오른쪽의 ∨ 아이콘 클릭 후 설정을 클릭한다.

 

설정창이 열리면 왼쪽 하단의 Json 파일 열기 클릭

 

Json 파일이 열리면

다음과 같은 내용이 있다.

"actions": 
    [
        // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
        // These two lines additionally bind them to Ctrl+C and Ctrl+V.
        // To learn more about selection, visit https://aka.ms/terminal-selection
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        // Press Ctrl+Shift+F to open the search box
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        // Press Alt+Shift+D to open a new pane.
        // - "split": "auto" makes this pane open in the direction that provides the most surface area.
        // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
        // To learn more about panes, visit https://aka.ms/terminal-panes
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],

 

다음 내용을 추가 한다.

{ "command": { "action": "switchToTab", "index": 0 }, "keys": "alt+1" },
{ "command": { "action": "switchToTab", "index": 1 }, "keys": "alt+2" },
{ "command": { "action": "switchToTab", "index": 2 }, "keys": "alt+3" },
{ "command": { "action": "switchToTab", "index": 3 }, "keys": "alt+4" },
{ "command": { "action": "switchToTab", "index": 4 }, "keys": "alt+5" },
{ "command": { "action": "switchToTab", "index": 5 }, "keys": "alt+6" },
{ "command": { "action": "switchToTab", "index": 6 }, "keys": "alt+7" },
{ "command": { "action": "switchToTab", "index": 7 }, "keys": "alt+8" },
{ "command": { "action": "switchToTab", "index": 8 }, "keys": "alt+9" }

 

 

첫번째 세팅된 부분

},
            "keys": "alt+shift+d"
        }

 

괄호 뒤에 ,를 추가해야 한다.

 

 

저장 -> 설정 창에서 저장 버튼을 누른 후 Alt 키와 숫자 키를 눌러보면

원하는 탭으로 이동이 가능하다.

반응형