@@ -1205,6 +1205,7 @@ const trayToggleEvtHandler = async () => {
12051205 quickSwitcher : 'Command+Control+R' ,
12061206 aiInsight : 'Command+Control+E' ,
12071207 aiChat : 'Command+Control+C' ,
1208+ terminal : 'Command+Control+T' ,
12081209 } ;
12091210
12101211 // Shortcut callback: Quick Switcher
@@ -1516,11 +1517,27 @@ const trayToggleEvtHandler = async () => {
15161517 // End of the new implementation
15171518 } ;
15181519
1520+ // Shortcut callback: Terminal (Ctrl+Cmd+T) — toggle behavior like Quick Switcher
1521+ const terminalCallback = ( ) => {
1522+ if ( BrowserWindow . getAllWindows ( ) . length === 0 ) {
1523+ switcherWindow = createSwitcherWindow ( ) ;
1524+ }
1525+ const window = getSwitcherWindow ( ) ;
1526+ if ( window && window . isVisible ( ) ) {
1527+ // If already showing Terminal tab, hide; otherwise switch to Terminal
1528+ window . webContents . send ( 'check-terminal-and-hide' ) ;
1529+ } else if ( window ) {
1530+ window . webContents . send ( 'switch-to-terminal' ) ;
1531+ showSwitcherWindow ( ) ;
1532+ }
1533+ } ;
1534+
15191535 // Map shortcut keys to their callbacks
15201536 const shortcutCallbacks : Record < string , ( ) => void > = {
15211537 quickSwitcher : quickSwitcherCallback ,
15221538 aiInsight : aiInsightCallback ,
15231539 aiChat : aiChatCallback ,
1540+ terminal : terminalCallback ,
15241541 } ;
15251542
15261543 // Register all shortcuts from settings (or defaults)
@@ -1542,6 +1559,7 @@ const trayToggleEvtHandler = async () => {
15421559 quickSwitcher : ( ( await settings . get ( 'shortcut-quickSwitcher' ) ) as string ) || DEFAULT_SHORTCUTS . quickSwitcher ,
15431560 aiInsight : ( ( await settings . get ( 'shortcut-aiInsight' ) ) as string ) || DEFAULT_SHORTCUTS . aiInsight ,
15441561 aiChat : ( ( await settings . get ( 'shortcut-aiChat' ) ) as string ) || DEFAULT_SHORTCUTS . aiChat ,
1562+ terminal : ( ( await settings . get ( 'shortcut-terminal' ) ) as string ) || DEFAULT_SHORTCUTS . terminal ,
15451563 } ) ;
15461564
15471565 const syncTrayShortcuts = async ( ) => {
0 commit comments